Migrate from deprecated VacuumEntity to StateVacuumEntity in Ecovacs#95920
Conversation
|
Hey there @OverloadUT, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
| def extra_state_attributes(self) -> dict[str, Any]: | ||
| """Return the device-specific state attributes of this vacuum.""" | ||
| data: dict[str, Any] = {} | ||
| data[ATTR_ERROR] = self.error |
There was a problem hiding this comment.
According to the documentation, this should not be needed, but it's missing in the base class.
We should fix that in a follow-up.
There was a problem hiding this comment.
the error property is initiated during __init__ with None and changed by on_error_() when needed.
but yes, it is not needed anymore on extra state attributes 👍
There was a problem hiding this comment.
there is no error property defined neither in the _BaseVacuum, nor in the StateVacuumEntity class (but mentioned in the docs) 🧐
now I get what you mean 🙈
|
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
973460b to
0b9fba4
Compare
emontnemery
left a comment
There was a problem hiding this comment.
Thanks a lot @mib1185 🚀
…ome-assistant#95920) * migrate to StateVacuumEntity * harmoize supported features start and stop * apply suggestions
Breaking change
The Ecovacs integration has been migrated to the new StateVacuumEntity under the hood.
The states of the vacuum entity now reports not only on or off, instead
cleaning,paused,docked(implicit mean charging),returning(to base),idleanderror. Further the actionsturn_on(start cleaning) andturn_off(stop cleaning and return to base) were superseded by three single actionsstart,stopandreturn_to_baseProposed change
Type of change
Additional information
Checklist
black --fast homeassistant tests)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest.requirements_all.txt.Updated by running
python3 -m script.gen_requirements_all..coveragerc.To help with the load of incoming pull requests: