mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 22:27:07 +00:00
Enforce SirenEntityFeature (#82464)
This commit is contained in:
parent
0cb3ec142e
commit
ff5f1aee53
@ -162,7 +162,7 @@ class SirenEntity(ToggleEntity):
|
|||||||
|
|
||||||
entity_description: SirenEntityDescription
|
entity_description: SirenEntityDescription
|
||||||
_attr_available_tones: list[int | str] | dict[int, str] | None
|
_attr_available_tones: list[int | str] | dict[int, str] | None
|
||||||
_attr_supported_features: SirenEntityFeature | int = 0
|
_attr_supported_features: SirenEntityFeature = SirenEntityFeature(0)
|
||||||
|
|
||||||
@final
|
@final
|
||||||
@property
|
@property
|
||||||
@ -190,6 +190,6 @@ class SirenEntity(ToggleEntity):
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def supported_features(self) -> SirenEntityFeature | int:
|
def supported_features(self) -> SirenEntityFeature:
|
||||||
"""Return the list of supported features."""
|
"""Return the list of supported features."""
|
||||||
return self._attr_supported_features
|
return self._attr_supported_features
|
||||||
|
@ -2214,7 +2214,7 @@ _INHERITANCE_MATCH: dict[str, list[ClassTypeHintMatch]] = {
|
|||||||
),
|
),
|
||||||
TypeHintMatch(
|
TypeHintMatch(
|
||||||
function_name="supported_features",
|
function_name="supported_features",
|
||||||
return_type=["SirenEntityFeature", "int"],
|
return_type="SirenEntityFeature",
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user