mirror of
https://github.com/home-assistant/core.git
synced 2025-08-14 01:55:18 +02:00
Improve type hint in ecobee climate entity (#77133)
This commit is contained in:
@@ -303,6 +303,9 @@ async def async_setup_entry(
|
|||||||
class Thermostat(ClimateEntity):
|
class Thermostat(ClimateEntity):
|
||||||
"""A thermostat class for Ecobee."""
|
"""A thermostat class for Ecobee."""
|
||||||
|
|
||||||
|
_attr_precision = PRECISION_TENTHS
|
||||||
|
_attr_temperature_unit = TEMP_FAHRENHEIT
|
||||||
|
|
||||||
def __init__(self, data, thermostat_index, thermostat):
|
def __init__(self, data, thermostat_index, thermostat):
|
||||||
"""Initialize the thermostat."""
|
"""Initialize the thermostat."""
|
||||||
self.data = data
|
self.data = data
|
||||||
@@ -381,16 +384,6 @@ class Thermostat(ClimateEntity):
|
|||||||
name=self.name,
|
name=self.name,
|
||||||
)
|
)
|
||||||
|
|
||||||
@property
|
|
||||||
def temperature_unit(self):
|
|
||||||
"""Return the unit of measurement."""
|
|
||||||
return TEMP_FAHRENHEIT
|
|
||||||
|
|
||||||
@property
|
|
||||||
def precision(self) -> float:
|
|
||||||
"""Return the precision of the system."""
|
|
||||||
return PRECISION_TENTHS
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def current_temperature(self) -> float:
|
def current_temperature(self) -> float:
|
||||||
"""Return the current temperature."""
|
"""Return the current temperature."""
|
||||||
|
Reference in New Issue
Block a user