Building the thermostat