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 RemoteEntityFeature #82463

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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Enforce RemoteEntityFeature
  • Loading branch information
epenet committed Nov 21, 2022
commit 5011dddc62b2fe567f5fa26821195ba3f76e910f
4 changes: 2 additions & 2 deletions homeassistant/components/remote/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion pylint/plugins/hass_enforce_type_hints.py
Original file line number Diff line number Diff line change
Expand Up @@ -2061,7 +2061,7 @@ class ClassTypeHintMatch:
),
TypeHintMatch(
function_name="supported_features",
return_type=["RemoteEntityFeature", "int"],
return_type="RemoteEntityFeature",
),
TypeHintMatch(
function_name="send_command",
Expand Down