Improve type hint in ecobee climate entity (#77133)

This commit is contained in:
epenet 2022-08-22 13:27:36 +02:00 committed by GitHub
parent 9467b7d018
commit 6693cfd036
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -303,6 +303,9 @@ async def async_setup_entry(
class Thermostat(ClimateEntity):
"""A thermostat class for Ecobee."""
_attr_precision = PRECISION_TENTHS
_attr_temperature_unit = TEMP_FAHRENHEIT
def __init__(self, data, thermostat_index, thermostat):
"""Initialize the thermostat."""
self.data = data
@ -381,16 +384,6 @@ class Thermostat(ClimateEntity):
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
def current_temperature(self) -> float:
"""Return the current temperature."""