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

@ -126,6 +126,8 @@ async def async_setup_entry(
class ZWaveClimate(ZWaveBaseEntity, ClimateEntity):
"""Representation of a Z-Wave climate."""
_attr_precision = PRECISION_TENTHS
def __init__(
self, config_entry: ConfigEntry, driver: Driver, info: ZwaveDiscoveryInfo
) -> None:
@ -251,11 +253,6 @@ class ZWaveClimate(ZWaveBaseEntity, ClimateEntity):
return TEMP_FAHRENHEIT
return TEMP_CELSIUS
@property
def precision(self) -> float:
"""Return the precision of 0.1."""
return PRECISION_TENTHS
@property
def hvac_mode(self) -> HVACMode:
"""Return hvac operation ie. heat, cool mode."""