Skip to content

Commit

Permalink
Enforce SirenEntityFeature (#82464)
Browse files Browse the repository at this point in the history
  • Loading branch information
epenet committed Nov 22, 2022
1 parent 0cb3ec1 commit ff5f1ae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions homeassistant/components/siren/__init__.py
Expand Up @@ -162,7 +162,7 @@ class SirenEntity(ToggleEntity):

entity_description: SirenEntityDescription
_attr_available_tones: list[int | str] | dict[int, str] | None
_attr_supported_features: SirenEntityFeature | int = 0
_attr_supported_features: SirenEntityFeature = SirenEntityFeature(0)

@final
@property
Expand Down Expand Up @@ -190,6 +190,6 @@ def available_tones(self) -> list[int | str] | dict[int, str] | None:
return None

@property
def supported_features(self) -> SirenEntityFeature | int:
def supported_features(self) -> SirenEntityFeature:
"""Return the list of supported features."""
return self._attr_supported_features
2 changes: 1 addition & 1 deletion pylint/plugins/hass_enforce_type_hints.py
Expand Up @@ -2214,7 +2214,7 @@ class ClassTypeHintMatch:
),
TypeHintMatch(
function_name="supported_features",
return_type=["SirenEntityFeature", "int"],
return_type="SirenEntityFeature",
),
],
),
Expand Down

0 comments on commit ff5f1ae

Please sign in to comment.