Create new state property for vacuum which is using an enum #1141
-
BackgroundThis is more or less a copy of #1140 but targets Some entity models (like ProposalSimilar to the @final
@cached_property
def state(self) -> str | None:
"""Return the activity of the vacuum cleaner."""
return activity
@cached_property
def activity(self) -> VacuumActivity | None:
"""Return the current vacuum entity state.
Integrations should overwrite this or use the '_attr_activity'
attribute to set the vacuum state using the 'VacuumActivity' enum.
"""
return self._attr_activity After the deprecation period integrations should only implement Draft conceptual PR:home-assistant/core#126353 Alternatives to considerInitial proposal was to add
Update after initial proposal
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
It would be nice to make it similar to lawnmower although as for lawnmower some of the enum values don't sound as activities, eg error. Maybe not a big deal, and it's more important to leverage consistency? |
Beta Was this translation helpful? Give feedback.
-
We've discussed this proposal in the Core team and decided to approve it. |
Beta Was this translation helpful? Give feedback.
We've discussed this proposal in the Core team and decided to approve it.