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

@ -142,6 +142,7 @@ async def async_setup_entry(
class ViCareClimate(ClimateEntity):
"""Representation of the ViCare heating climate device."""
_attr_precision = PRECISION_TENTHS
_attr_supported_features = (
ClimateEntityFeature.TARGET_TEMPERATURE | ClimateEntityFeature.PRESET_MODE
)
@ -320,11 +321,6 @@ class ViCareClimate(ClimateEntity):
"""Return the maximum temperature."""
return VICARE_TEMP_HEATING_MAX
@property
def precision(self):
"""Return the precision of the system."""
return PRECISION_TENTHS
@property
def target_temperature_step(self) -> float:
"""Set target temperature step to wholes."""