mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 17:57:11 +00:00
Define RemoteEntity entity attributes as class variables (#51904)
This commit is contained in:
parent
9f17b8856a
commit
17a71020db
@ -145,20 +145,24 @@ async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||||||
class RemoteEntity(ToggleEntity):
|
class RemoteEntity(ToggleEntity):
|
||||||
"""Base class for remote entities."""
|
"""Base class for remote entities."""
|
||||||
|
|
||||||
|
_attr_activity_list: list[str] | None = None
|
||||||
|
_attr_current_activity: str | None = None
|
||||||
|
_attr_supported_features: int = 0
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def supported_features(self) -> int:
|
def supported_features(self) -> int:
|
||||||
"""Flag supported features."""
|
"""Flag supported features."""
|
||||||
return 0
|
return self._attr_supported_features
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def current_activity(self) -> str | None:
|
def current_activity(self) -> str | None:
|
||||||
"""Active activity."""
|
"""Active activity."""
|
||||||
return None
|
return self._attr_current_activity
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def activity_list(self) -> list[str] | None:
|
def activity_list(self) -> list[str] | None:
|
||||||
"""List of available activities."""
|
"""List of available activities."""
|
||||||
return None
|
return self._attr_activity_list
|
||||||
|
|
||||||
@final
|
@final
|
||||||
@property
|
@property
|
||||||
|
Loading…
x
Reference in New Issue
Block a user