Optimization of Energy Expenditure in Smart Homes under Time-of-Use Pricing of Optimization of energy expenditure in smart homes under Time-of-Use pricing