Use _attr_precision in entities (#77477)
This commit is contained in:
parent
d4c020b675
commit
e19e65908a
12 changed files with 14 additions and 73 deletions
|
@ -126,6 +126,7 @@ def _return_on_connection_error(ret=None):
|
|||
class ControllerDevice(ClimateEntity):
|
||||
"""Representation of iZone Controller."""
|
||||
|
||||
_attr_precision = PRECISION_TENTHS
|
||||
_attr_should_poll = False
|
||||
_attr_temperature_unit = TEMP_CELSIUS
|
||||
|
||||
|
@ -253,11 +254,6 @@ class ControllerDevice(ClimateEntity):
|
|||
"""Return the name of the entity."""
|
||||
return f"iZone Controller {self._controller.device_uid}"
|
||||
|
||||
@property
|
||||
def precision(self) -> float:
|
||||
"""Return the precision of the system."""
|
||||
return PRECISION_TENTHS
|
||||
|
||||
@property
|
||||
def extra_state_attributes(self):
|
||||
"""Return the optional state attributes."""
|
||||
|
@ -438,6 +434,7 @@ class ControllerDevice(ClimateEntity):
|
|||
class ZoneDevice(ClimateEntity):
|
||||
"""Representation of iZone Zone."""
|
||||
|
||||
_attr_precision = PRECISION_TENTHS
|
||||
_attr_should_poll = False
|
||||
_attr_temperature_unit = TEMP_CELSIUS
|
||||
|
||||
|
@ -526,11 +523,6 @@ class ZoneDevice(ClimateEntity):
|
|||
return self._attr_supported_features
|
||||
return self._attr_supported_features & ~ClimateEntityFeature.TARGET_TEMPERATURE
|
||||
|
||||
@property
|
||||
def precision(self):
|
||||
"""Return the precision of the system."""
|
||||
return PRECISION_TENTHS
|
||||
|
||||
@property
|
||||
def hvac_mode(self) -> HVACMode | None:
|
||||
"""Return current operation ie. heat, cool, idle."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue