Cost-Optimal Energy Scheduling of a Smart Home under Uncertainty