-
-
Notifications
You must be signed in to change notification settings - Fork 31.7k
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
Allow pausing xiaomi vacuum in all states #20620
Conversation
At least the second issue should be fixed at the underlying library ( |
ok, so reverted the second issue. |
@MartinHjelmare little out if this PR, but is this possible to get into this
|
|
Haha, I lowercased it somehow in my head :) |
This is intertwined with rytilahti/python-miio#471 -- what happens/what should happen when clicking start again after pausing? |
I don't think is that it is interwined. About what should happen when clicking start again after pausing I imagine that default behaviour should be resume last state, not clean all. |
One problem is that the state gets reverted (most likely) back to idle after some time (see xiaomi_miio.state implementation for an example of this happening with the error handling). Anyway, the backend library should definitely support resuming (unpausing) the state, this will be added as a new command. The For the time being, could you check what |
Output of command:
I think I can resolve conflicts in this PR and it can be merged to just repair first problem:
@rytilahti what do you think? |
At that point the vacuum had cleaned already, so there's no reason for it to crash (like without one, which is likely fixed by my PR in python-miio). Anyway, this change can be merged after the conflict is fixed, there is AFAIK nothing wrong in calling the pause even when the device is already stopped. |
allow pause vacuum when returning to base
Rebased it. I think it is ready to be merged. |
* fix state update when no cleaning is yet performed allow pause vacuum when returning to base * revert checking of atttribute updates. Will be fixed in upstream lib. * remove unnecesarry if on pause_commadn
I bought Xiaomii vacuum for my parents and found one bug and also reason for one annoying problem.
So two fixes in this PR.
For now user can only pause vacuum while cleaning. I thought that it was some limitation of python miio module, but no. It was component designed that way.
so added STATE_RETURNING to this if.
Don't know if checking should be added to every attribute update. Waiting for your opinions on it.
For sure it was crashing on:
Checklist:
tox
. Your PR cannot be merged unless tests pass