implemented thermostat demo