Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enforce SirenEntityFeature #82464

Merged
merged 1 commit into from Nov 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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