Enforce FanEntityFeature (#82458)

* Enforce FanEntityFeature

* Adjust pylint
This commit is contained in:
epenet 2022-11-22 07:13:54 +01:00 committed by GitHub
parent 34607d4410
commit 12cb17620e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 14 additions and 12 deletions

View file

@ -95,9 +95,9 @@ class BaseHomeKitFan(HomeKitEntity, FanEntity):
return oscillating == 1
@property
def supported_features(self) -> FanEntityFeature | int:
def supported_features(self) -> FanEntityFeature:
"""Flag supported features."""
features = 0
features = FanEntityFeature(0)
if self.service.has(CharacteristicsTypes.ROTATION_DIRECTION):
features |= FanEntityFeature.DIRECTION