Skip to content
Snippets Groups Projects
Unverified Commit a40c1401 authored by epenet's avatar epenet Committed by GitHub
Browse files

Adjust temperature_unit in heatmiser (#77584)

parent 471878b5
No related branches found
No related tags found
No related merge requests found
...@@ -84,18 +84,12 @@ class HeatmiserV3Thermostat(ClimateEntity): ...@@ -84,18 +84,12 @@ class HeatmiserV3Thermostat(ClimateEntity):
self._id = device self._id = device
self.dcb = None self.dcb = None
self._attr_hvac_mode = HVACMode.HEAT self._attr_hvac_mode = HVACMode.HEAT
self._temperature_unit = None
@property @property
def name(self): def name(self):
"""Return the name of the thermostat, if any.""" """Return the name of the thermostat, if any."""
return self._name return self._name
@property
def temperature_unit(self):
"""Return the unit of measurement which this thermostat uses."""
return self._temperature_unit
@property @property
def current_temperature(self): def current_temperature(self):
"""Return the current temperature.""" """Return the current temperature."""
...@@ -119,7 +113,7 @@ class HeatmiserV3Thermostat(ClimateEntity): ...@@ -119,7 +113,7 @@ class HeatmiserV3Thermostat(ClimateEntity):
_LOGGER.error("Failed to update device %s", self._name) _LOGGER.error("Failed to update device %s", self._name)
return return
self.dcb = self.therm.read_dcb() self.dcb = self.therm.read_dcb()
self._temperature_unit = ( self._attr_temperature_unit = (
TEMP_CELSIUS TEMP_CELSIUS
if (self.therm.get_temperature_format() == "C") if (self.therm.get_temperature_format() == "C")
else TEMP_FAHRENHEIT else TEMP_FAHRENHEIT
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment