Enforce ClimateEntityFeature (#82329)

This commit is contained in:
epenet 2022-11-22 07:08:53 +01:00 committed by GitHub
parent 8b54a0679f
commit 48cc3071bb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 18 additions and 19 deletions

View file

@ -176,9 +176,9 @@ class SensiboClimate(SensiboDeviceBaseEntity, ClimateEntity):
self._attr_supported_features = self.get_features()
self._attr_precision = PRECISION_TENTHS
def get_features(self) -> ClimateEntityFeature | int:
def get_features(self) -> ClimateEntityFeature:
"""Get supported features."""
features = 0
features = ClimateEntityFeature(0)
for key in self.device_data.full_features:
if key in FIELD_TO_FLAG:
features |= FIELD_TO_FLAG[key]