-
-
Notifications
You must be signed in to change notification settings - Fork 29.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Xiaomi Vacuum to new StateVacuumDevice #15643
Conversation
try: | ||
return STATE_CODE_TO_STATE[int(self.vacuum_state.state_code)] | ||
except KeyError: | ||
_LOGGER.error("STATE not supported: %s, state_code: %s, please report", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (87 > 79 characters)
@syssi @rytilahti Can you take a look at this, so that we may get this in the same release as #15573 ? :-) |
Part of: home-assistant/architecture#29 |
c9e9284
to
106bbde
Compare
@rytilahti @syssi Sorry for asking again, but could one of you chime in on this, such that it can be a part of the same release as the Component changes in: #15751 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I cannot test the changes because I don't own the device.
I have been running it here since I pushed the changes to the PR without problems. |
@cnrd this broke my node-red automation. The state doesn't have enough information anymore. When calling the service |
The proposal have been open for a long time: home-assistant/architecture#29 remote was not identified as a common state and as such is not supported. The best thing we can do currently is change that unknown to cleaning. I'm not sure how many vacuums support remote, so you may have to propose to have it added in that thread such that people who use other vacuums can chip in on wether it makes sense to add that state or not. |
Description:
Adds support for states to the Xiaomi Vacuum Platform, this can be merged after: #15573
It also introduce breaking changes, as it no longer uses:
Also removes any functions related to ToggleEntity, which results in the following services no longer working:
Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.io#5902
Checklist:
tox
. Your PR cannot be merged unless tests pass