Define RemoteEntity entity attributes as class variables (#51904)
This commit is contained in:
parent
9f17b8856a
commit
17a71020db
1 changed files with 7 additions and 3 deletions
|
@ -145,20 +145,24 @@ async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||
class RemoteEntity(ToggleEntity):
|
||||
"""Base class for remote entities."""
|
||||
|
||||
_attr_activity_list: list[str] | None = None
|
||||
_attr_current_activity: str | None = None
|
||||
_attr_supported_features: int = 0
|
||||
|
||||
@property
|
||||
def supported_features(self) -> int:
|
||||
"""Flag supported features."""
|
||||
return 0
|
||||
return self._attr_supported_features
|
||||
|
||||
@property
|
||||
def current_activity(self) -> str | None:
|
||||
"""Active activity."""
|
||||
return None
|
||||
return self._attr_current_activity
|
||||
|
||||
@property
|
||||
def activity_list(self) -> list[str] | None:
|
||||
"""List of available activities."""
|
||||
return None
|
||||
return self._attr_activity_list
|
||||
|
||||
@final
|
||||
@property
|
||||
|
|
Loading…
Add table
Reference in a new issue