Add short-hand attributes to vacuum (#81782)

Add attributes to vacuum
pull/81787/head
epenet 2022-11-08 13:58:47 +01:00 committed by GitHub
parent 4293c88fb6
commit 9b0b8ae9c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -318,11 +318,12 @@ class VacuumEntity(_BaseVacuum, ToggleEntity):
"""Representation of a vacuum cleaner robot."""
entity_description: VacuumEntityDescription
_attr_status: str | None = None
@property
def status(self) -> str | None:
"""Return the status of the vacuum cleaner."""
return None
return self._attr_status
@property
def battery_icon(self) -> str:
@ -394,11 +395,12 @@ class StateVacuumEntity(_BaseVacuum):
"""Representation of a vacuum cleaner robot that supports states."""
entity_description: StateVacuumEntityDescription
_attr_state: str | None = None
@property
def state(self) -> str | None:
"""Return the state of the vacuum cleaner."""
return None
return self._attr_state
@property
def battery_icon(self) -> str: