Thermostats for the smart home