Enforce RemoteEntityFeature (#82463)

pull/82567/head
epenet 2022-11-22 07:16:03 +01:00 committed by GitHub
parent 6f05a74686
commit 0cb3ec142e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -166,10 +166,10 @@ class RemoteEntity(ToggleEntity):
entity_description: RemoteEntityDescription
_attr_activity_list: list[str] | None = None
_attr_current_activity: str | None = None
_attr_supported_features: RemoteEntityFeature | int = 0
_attr_supported_features: RemoteEntityFeature = RemoteEntityFeature(0)
@property
def supported_features(self) -> RemoteEntityFeature | int:
def supported_features(self) -> RemoteEntityFeature:
"""Flag supported features."""
return self._attr_supported_features

View File

@ -2061,7 +2061,7 @@ _INHERITANCE_MATCH: dict[str, list[ClassTypeHintMatch]] = {
),
TypeHintMatch(
function_name="supported_features",
return_type=["RemoteEntityFeature", "int"],
return_type="RemoteEntityFeature",
),
TypeHintMatch(
function_name="send_command",