Move shorthand attributes out of constructor in Sensibo (#99834)

Use shorthand attributes in Sensibo
This commit is contained in:
Joost Lekkerkerker
2023-09-07 17:28:13 +02:00
committed by GitHub
parent 73651dbffd
commit 69f6a115b6

View File

@@ -180,6 +180,8 @@ class SensiboClimate(SensiboDeviceBaseEntity, ClimateEntity):
"""Representation of a Sensibo device."""
_attr_name = None
_attr_precision = PRECISION_TENTHS
_attr_translation_key = "climate_device"
def __init__(
self, coordinator: SensiboDataUpdateCoordinator, device_id: str
@@ -193,8 +195,6 @@ class SensiboClimate(SensiboDeviceBaseEntity, ClimateEntity):
else UnitOfTemperature.FAHRENHEIT
)
self._attr_supported_features = self.get_features()
self._attr_precision = PRECISION_TENTHS
self._attr_translation_key = "climate_device"
def get_features(self) -> ClimateEntityFeature:
"""Get supported features."""