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

@ -77,9 +77,9 @@ class MySensorsHVAC(mysensors.device.MySensorsEntity, ClimateEntity):
_attr_hvac_modes = OPERATION_LIST
@property
def supported_features(self) -> ClimateEntityFeature | int:
def supported_features(self) -> ClimateEntityFeature:
"""Return the list of supported features."""
features = 0
features = ClimateEntityFeature(0)
set_req = self.gateway.const.SetReq
if set_req.V_HVAC_SPEED in self._values:
features = features | ClimateEntityFeature.FAN_MODE