def max_celsius(self): """ Return the thermostat's maximum temperature in Celsius """ if not self.max_temperature: return None return nuheat_to_celsius(self.max_temperature)
def celsius(self): """ Return the current temperature in Celsius """ if not self.temperature: return None return nuheat_to_celsius(self.temperature)
def test_nuheat_to_celsius(self): tests = [ [500, 5], # min [2222, 22], [7000, 69] # max ] for test in tests: celsius = util.nuheat_to_celsius(test[0]) self.assertEqual(celsius, test[1])
def target_temperature(self): """Return the currently programmed temperature.""" if self._temperature_unit == "C": return nuheat_to_celsius(self._target_temperature) return nuheat_to_fahrenheit(self._target_temperature)