-
-
Notifications
You must be signed in to change notification settings - Fork 31.3k
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
xiaomi_miio: vacuum.set_fan_speed not working on fw: 3.5.7_002008+ #31268
Comments
Please fill out the issue template :) you can find it by clicking on |
Hey there @rytilahti, @syssi, mind taking a look at this issue as its been labeled with a integration ( |
I had issues with my Xiaomi vacuum 1S and what I did was changing the fan speed on Mi Home and then wait until HA shows the corresponding value in vacuum entity attributes, to map each speed (in my case, 102 corresponds to Balanced): What I do is then using vacuum.set_fan_speed service to change the fan speed properly from HA. Integration is not perfect but it works until this is fixed in the underlying library python-miio. |
This returns a dictionary {name, value} of the available fan speeds, the main driver being the need to simplify homeassistant integrations for different devices. For viomi vacuums this is currently straightforward and hard-coded, but we do special handling for rockrobo devices (based on info() responses): * If the query succeeds, newer firmware versions (3.5.7+) of v1 are handled as a special case, otherwise the new-style [100-105] mapping is returned. * If the query fails, we fall back to rockrobo v1's percentage-based mapping. This happens, e.g., when the vacuum has no cloud connectivity. Related to #523 Related downstream issues home-assistant/core#32821 home-assistant/core#31268 home-assistant/core#27268
This needs input from Xiaomi vacuum owners to verify that it does not break anything. I have personally tested this on rockrobo v1 (old mapping). Related issues/PRs: home-assistant#32821 home-assistant#31268 home-assistant#27268 This is a WIP as it requires a new upstream release. The PR is rytilahti/python-miio#643
Anyone mind testing #32850 to make sure the special case handling is working for you now? I can then proceed to get this fixed :-) edit: ping @gibman, @finipini, @pplucky, @benct – I'd like to get this checked and merged, so if you can spare some time, could you please test the upstream PR to see if it is reporting the correct information for your devices? |
* Add fan_speed_presets() for querying available fan speeds This returns a dictionary {name, value} of the available fan speeds, the main driver being the need to simplify homeassistant integrations for different devices. For viomi vacuums this is currently straightforward and hard-coded, but we do special handling for rockrobo devices (based on info() responses): * If the query succeeds, newer firmware versions (3.5.7+) of v1 are handled as a special case, otherwise the new-style [100-105] mapping is returned. * If the query fails, we fall back to rockrobo v1's percentage-based mapping. This happens, e.g., when the vacuum has no cloud connectivity. Related to #523 Related downstream issues home-assistant/core#32821 home-assistant/core#31268 home-assistant/core#27268 * Fix method naming.. * small pre-merge cleanups
I'm planning to make a new release this weekend, which I hope will fix this issue for gen1 vacuums. As I have not heard anyone reporting back whether it works or not, I simply hope it works.. |
Unfortunately without a new python-miio release, I can't test it, as my test system is currently running on hass.io over Docker/raspbian. If new python-miio is released, I can try to set it up as a custom-component and go from there. Do you think it will work? Sorry for not coming back to you earlier. |
If you don't mind, you could simply create a virtual environment and install the PR only for it for testing, see #32850 (comment) . There is no need to involve any tests with homeassistant: if the command there gives the correct information, it will definitely be fixed when this PR gets merged. |
Done and result is here. |
Thanks 👍 Looks like it is working as expected, so the next version of python-miio & version bump will fix this for good! edit: looks like yours is not the first-gen vacuum though.. Oh well.. |
* Use backend-provided fan speed presets for Xiaomi vacuums This needs input from Xiaomi vacuum owners to verify that it does not break anything. I have personally tested this on rockrobo v1 (old mapping). Related issues/PRs: #32821 #31268 #27268 This is a WIP as it requires a new upstream release. The PR is rytilahti/python-miio#643 * Bump version requirement for 0.5.0 * Bump requirements_test_all.txt, too * Fix linting; missing setup.cfg on local checkout caused wrong settings for black.. * Add tests for both fan speed types * Remove useless else.. * bump python-miio to 0.5.0.1 due to broken 0.5.0 packaging
this work on the dev branch of .108 but on the latest release it doesn't |
@markrennie71 please open a new issue and provide necessary details (model of the vacuum, firmware version, version of python-miio, describe what is not working, ..). |
running hass 0.104.3
vacuum.set_fan_speed does no longer work properly on roborock vacuum s5 with FW: 3.5.7_002008
Though I am able to set fanspeed 105 or "Gentle" .. this seems to put it into low fan mode.
If I try any other value 0-100, Medium, Turbo etc etc.. they all put the vacuum speed back to full speed.
The previous FW worked fine on all fan speeds.
Setting the fanspeed within the official mihome app works as well.
The text was updated successfully, but these errors were encountered: