Use _attr_temperature_unit in climate entities (#77472)
This commit is contained in:
parent
8ed689fede
commit
0c401bcab2
22 changed files with 28 additions and 114 deletions
|
@ -35,6 +35,8 @@ async def async_setup_entry(
|
|||
class SpiderThermostat(ClimateEntity):
|
||||
"""Representation of a thermostat."""
|
||||
|
||||
_attr_temperature_unit = TEMP_CELSIUS
|
||||
|
||||
def __init__(self, api, thermostat):
|
||||
"""Initialize the thermostat."""
|
||||
self.api = api
|
||||
|
@ -75,11 +77,6 @@ class SpiderThermostat(ClimateEntity):
|
|||
"""Return the name of the thermostat, if any."""
|
||||
return self.thermostat.name
|
||||
|
||||
@property
|
||||
def temperature_unit(self):
|
||||
"""Return the unit of measurement."""
|
||||
return TEMP_CELSIUS
|
||||
|
||||
@property
|
||||
def current_temperature(self):
|
||||
"""Return the current temperature."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue