Enforce MediaPlayerEntityFeature (#82462)

This commit is contained in:
epenet 2022-11-22 07:15:37 +01:00 committed by GitHub
parent a225fc456f
commit 6f05a74686
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 26 additions and 24 deletions

View file

@ -80,9 +80,9 @@ class HomeKitTelevision(HomeKitEntity, MediaPlayerEntity):
]
@property
def supported_features(self) -> MediaPlayerEntityFeature | int:
def supported_features(self) -> MediaPlayerEntityFeature:
"""Flag media player features that are supported."""
features = 0
features = MediaPlayerEntityFeature(0)
if self.service.has(CharacteristicsTypes.ACTIVE_IDENTIFIER):
features |= MediaPlayerEntityFeature.SELECT_SOURCE