pyvesync
pyvesync copied to clipboard
Core 200s - can't switch from sleep to previous speed
Hi, I'm currently looking at the issue described in https://github.com/home-assistant/core/issues/70420, would you be able to help with it?
What happens is that, if I set the fan speed to 33% (or 1 in your library), enable the preset mode sleep
, and then switch back the speed to 33%, nothing happens. The only way is to turn the fan off, turn it on (which puts the speed at 66%) and then lower it to 33%.
I tried to do some debugging of your library and home-assistant/core, and so far I found that:
- In home-assistant/core, the call to
manual_mode
returns false, because the fan doesn't have that mode, while thechange_fan_speed
returns true. - The
change_fan_speed
returns true but no API call from the library is logged. My guess is that the execution is terminated earlier here because the preset change has no effect on thespeed
field.
Hey, I stumbled upon your issue while looking at the library for another one. I'm developping a custom component to override the core VeSync integration, as it doesn't support humidifier and doesn't seem very active... Can you have a try and let me know whether you get any improvement? https://github.com/vlebourl/custom_vesync
@gmariotti I think I can remove that check for fan speed and it should fix it so that you can set fan speed from sleep mode. I'll make a PR shortly
Hey @vlebourl I didn't have a chance yet to try your custom component, but I'll let you know when I'll do it.
@webdjoe I'm currently using the OS version of Home Assistant, is there any way I can try your PR once it's ready? Or should I just wait for the version bump on Home Assistant side?
@gmariotti Not if you are using the OS version. You can create a testing script in a virtual environment on your computer to check if those calls work as expected. I don't have a Core200S to test myself
@webdjoe I think I can reuse the virtual environment I set up when debugging the issue, so it shouldn't be a problem.
I just added 'manual' mode to the core200s in this branch #144. That should fix it without breaking anything. Please test it out by cloning the branch in a fresh environment. You can just download the branch directly or use the following.
Once you have the virtual environment created and activated, you can install the branch directly with pip:
python -m pip install git+https://github.com/webdjoe/pyvesync.git@core200s-manual-fix
Let me know if it is good to publish
@webdjoe I just looked at your PR, it seems that you added the manual mode to the Classic200S
instead of the Core200S
@gmariotti That's embarrassing 😳. This issue actually impacts all air purifiers. I have a 400s that I was able to test with and it should be working now without breaking any prior functionality
Hi @webdjoe, sorry to bother you again on this, is there anything blocking merging https://github.com/webdjoe/pyvesync/pull/144 and getting a new version of the library released?
Merged, I'll upload the package today
Great, thank you @webdjoe 🙏
@webdjoe is there anything blocking the release of the library?
My apologies, just the lack of time, uploaded to pypi version 2.1.0!
My apologies, just the lack of time, uploaded to pypi version 2.1.0!
Can you also make a github release of the 2.1.0 ? There are lots of places that reference the github releases.
You got it, released and tagged!