Add thermostat logic.