Updated so that you can use with more than one thermostat; TODO: make it work with smoke detectors