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

@ -74,6 +74,7 @@ async def async_setup_entry(
class ElkThermostat(ElkEntity, ClimateEntity):
"""Representation of an Elk-M1 Thermostat."""
_attr_precision = PRECISION_WHOLE
_attr_supported_features = (
ClimateEntityFeature.FAN_MODE
| ClimateEntityFeature.AUX_HEAT
@ -138,11 +139,6 @@ class ElkThermostat(ElkEntity, ClimateEntity):
"""Return the list of available operation modes."""
return SUPPORT_HVAC
@property
def precision(self) -> int:
"""Return the precision of the system."""
return PRECISION_WHOLE
@property
def is_aux_heat(self) -> bool:
"""Return if aux heater is on."""