This is how to make your thermostat work for you-and not the other way round.