Adjust temperature_unit in heatmiser (#77584)
This commit is contained in:
parent
471878b5fa
commit
a40c1401d3
1 changed files with 1 additions and 7 deletions
|
@ -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):
|
||||||
_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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue