Use _attr_precision in entities (#77477)

This commit is contained in:
epenet 2022-08-29 22:02:29 +02:00 committed by GitHub
parent d4c020b675
commit e19e65908a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 14 additions and 73 deletions

View file

@ -137,6 +137,7 @@ class Thermostat(ZhaEntity, ClimateEntity):
DEFAULT_MAX_TEMP = 35
DEFAULT_MIN_TEMP = 7
_attr_precision = PRECISION_TENTHS
_attr_temperature_unit = TEMP_CELSIUS
def __init__(self, unique_id, zha_device, channels, **kwargs):
@ -264,11 +265,6 @@ class Thermostat(ZhaEntity, ClimateEntity):
"""Return the list of available HVAC operation modes."""
return SEQ_OF_OPERATION.get(self._thrm.ctrl_sequence_of_oper, [HVACMode.OFF])
@property
def precision(self):
"""Return the precision of the system."""
return PRECISION_TENTHS
@property
def preset_mode(self) -> str:
"""Return current preset mode."""