Fixed calculation error in the test for the thermostat.