Automating Smart Homes for Maximum Solar Energy Utilisation