mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 06:07:17 +00:00
Adjust type hints for RemoteEntityFeature (#82265)
This commit is contained in:
parent
b6586d5c34
commit
9b9bdc725f
@ -166,10 +166,10 @@ class RemoteEntity(ToggleEntity):
|
|||||||
entity_description: RemoteEntityDescription
|
entity_description: RemoteEntityDescription
|
||||||
_attr_activity_list: list[str] | None = None
|
_attr_activity_list: list[str] | None = None
|
||||||
_attr_current_activity: str | None = None
|
_attr_current_activity: str | None = None
|
||||||
_attr_supported_features: int = 0
|
_attr_supported_features: RemoteEntityFeature | int = 0
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def supported_features(self) -> int:
|
def supported_features(self) -> RemoteEntityFeature | int:
|
||||||
"""Flag supported features."""
|
"""Flag supported features."""
|
||||||
return self._attr_supported_features
|
return self._attr_supported_features
|
||||||
|
|
||||||
|
@ -2052,16 +2052,16 @@ _INHERITANCE_MATCH: dict[str, list[ClassTypeHintMatch]] = {
|
|||||||
base_class="RemoteEntity",
|
base_class="RemoteEntity",
|
||||||
matches=[
|
matches=[
|
||||||
TypeHintMatch(
|
TypeHintMatch(
|
||||||
function_name="supported_features",
|
function_name="activity_list",
|
||||||
return_type="int",
|
return_type=["list[str]", None],
|
||||||
),
|
),
|
||||||
TypeHintMatch(
|
TypeHintMatch(
|
||||||
function_name="current_activity",
|
function_name="current_activity",
|
||||||
return_type=["str", None],
|
return_type=["str", None],
|
||||||
),
|
),
|
||||||
TypeHintMatch(
|
TypeHintMatch(
|
||||||
function_name="activity_list",
|
function_name="supported_features",
|
||||||
return_type=["list[str]", None],
|
return_type=["RemoteEntityFeature", "int"],
|
||||||
),
|
),
|
||||||
TypeHintMatch(
|
TypeHintMatch(
|
||||||
function_name="send_command",
|
function_name="send_command",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user