Open broekhuijsen opened 3 months ago
It looks like the implementation of the dmaker.fan.p33
is incomplete here:
"""
TODO:
- fan.turn_on works, but doesn't go to the declared percentage. This is
not an issue when using set_percentage()
- setting child lock works, but HA always reads the value as null
"""
You could use the set_percentage
service as workaround but I guess you want to control the fan using the UI (lovelace) and the control element of the fan speed doesn't work?
Hi there, thanks for your response. Yes that is exactly the case. I want to use the slider in love lace. I don't know if it would be possible to create a number input and link that to a script that uses the set_percentage() to mimic this behaviour. But if the implementation is going to be finished in the near future I might as well just have some patience :D It is good to know that at least the problem as already known :D
Do you know how to put a custom_component
into the custom_components
folder to poke around a bit? :-)
Barely. I mean I can create a folder and copy files to that folder. But I have little knowledge about how to change code. If, it is usually google - copy - paste, rinse and repeat until I either accidentally do it correct (10%) or give up and feel frustrated (90%) :D
Do you use HACS to install custom components? I'm looking for a simple solution to provide a test version of this integration which fixes the issue.
I do use HACS yes. You want me to test anything? I have installed custom components before.
Yes. I've an idea what's going on here and will provide a fixed version later the day for testing.
Ok I'm happy to test it for you
Sent from Outlook for Androidhttps://aka.ms/AAb9ysg
From: Sebastian Muszynski @.> Sent: Saturday, August 31, 2024 11:11:14 AM To: syssi/xiaomi_fan @.> Cc: broekhuijsen @.>; Author @.> Subject: Re: [syssi/xiaomi_fan] dmaker.fan.p33 can only be set to 25, 50, 75 and 100% (Issue #276)
Yes. I've an idea what's going on here and will provide a fixed version later the day for testing.
β Reply to this email directly, view it on GitHubhttps://github.com/syssi/xiaomi_fan/issues/276#issuecomment-2322851126, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AP7ITSTIEJSH42NGTQJLGK3ZUGJEFAVCNFSM6AAAAABNNBNBGSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMRSHA2TCMJSGY. You are receiving this because you authored the thread.Message ID: @.***>
I've pushed a feature branch containing some fixes. Please use HACS to install the version of the feature branch:
version
checkbox and set fix-p33-speed
Ok, I followed your instructions but I get an error Failed to perform the action fan/set_percentage. 'speed
After that I deinstalled everything through HACS, reinstalled it, followed your instructions again, but still the same error.
I don't know if the log is of any use.
(I removed the log because it was showing a lot, but nothing more about the fan than what I posted below)
2024-08-31 15:04:07.844 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration xiaomi_miio_fan which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant File "/config/custom_components/xiaomi_miio_fan/fan.py", line 1034, in async_set_percentage File "/config/custom_components/xiaomi_miio_fan/fan.py", line 619, in _try_command File "/config/custom_components/xiaomi_miio_fan/fan.py", line 2090, in set_speed File "/config/custom_components/xiaomi_miio_fan/fan.py", line 1034, in async_set_percentage File "/config/custom_components/xiaomi_miio_fan/fan.py", line 619, in _try_command File "/config/custom_components/xiaomi_miio_fan/fan.py", line 2090, in set_speed File "/config/custom_components/xiaomi_miio_fan/fan.py", line 1034, in async_set_percentage File "/config/custom_components/xiaomi_miio_fan/fan.py", line 619, in _try_command File "/config/custom_components/xiaomi_miio_fan/fan.py", line 2090, in set_speed File "/config/custom_components/xiaomi_miio_fan/fan.py", line 1034, in async_set_percentage File "/config/custom_components/xiaomi_miio_fan/fan.py", line 619, in _try_command File "/config/custom_components/xiaomi_miio_fan/fan.py", line 2090, in set_speed File "/config/custom_components/xiaomi_miio_fan/fan.py", line 1034, in async_set_percentage File "/config/custom_components/xiaomi_miio_fan/fan.py", line 619, in _try_command File "/config/custom_components/xiaomi_miio_fan/fan.py", line 2090, in set_speed File "/config/custom_components/xiaomi_miio_fan/fan.py", line 1034, in async_set_percentage File "/config/custom_components/xiaomi_miio_fan/fan.py", line 619, in _try_command File "/config/custom_components/xiaomi_miio_fan/fan.py", line 2090, in set_speed File "/config/custom_components/xiaomi_miio_fan/fan.py", line 1034, in async_set_percentage File "/config/custom_components/xiaomi_miio_fan/fan.py", line 619, in _try_command File "/config/custom_components/xiaomi_miio_fan/fan.py", line 2090, in set_speed File "/config/custom_components/xiaomi_miio_fan/fan.py", line 1034, in async_set_percentage File "/config/custom_components/xiaomi_miio_fan/fan.py", line 619, in _try_command File "/config/custom_components/xiaomi_miio_fan/fan.py", line 2090, in set_speed File "/config/custom_components/xiaomi_miio_fan/fan.py", line 1034, in async_set_percentage File "/config/custom_components/xiaomi_miio_fan/fan.py", line 619, in _try_command File "/config/custom_components/xiaomi_miio_fan/fan.py", line 2090, in set_speed File "/config/custom_components/xiaomi_miio_fan/fan.py", line 1034, in async_set_percentage File "/config/custom_components/xiaomi_miio_fan/fan.py", line 619, in _try_command File "/config/custom_components/xiaomi_miio_fan/fan.py", line 2090, in set_speed File "/config/custom_components/xiaomi_miio_fan/fan.py", line 1034, in async_set_percentage File "/config/custom_components/xiaomi_miio_fan/fan.py", line 619, in _try_command File "/config/custom_components/xiaomi_miio_fan/fan.py", line 2090, in set_speed File "/config/custom_components/xiaomi_miio_fan/fan.py", line 1034, in async_set_percentage File "/config/custom_components/xiaomi_miio_fan/fan.py", line 619, in _try_command File "/config/custom_components/xiaomi_miio_fan/fan.py", line 2090, in set_speed File "/config/custom_components/xiaomi_miio_fan/fan.py", line 1034, in async_set_percentage File "/config/custom_components/xiaomi_miio_fan/fan.py", line 619, in _try_command File "/config/custom_components/xiaomi_miio_fan/fan.py", line 2090, in set_speed File "/config/custom_components/xiaomi_miio_fan/fan.py", line 1034, in async_set_percentage File "/config/custom_components/xiaomi_miio_fan/fan.py", line 619, in _try_command File "/config/custom_components/xiaomi_miio_fan/fan.py", line 2090, in set_speed File "/config/custom_components/xiaomi_miio_fan/fan.py", line 1034, in async_set_percentage File "/config/custom_components/xiaomi_miio_fan/fan.py", line 619, in _try_command File "/config/custom_components/xiaomi_miio_fan/fan.py", line 2090, in set_speed File "/config/custom_components/xiaomi_miio_fan/fan.py", line 1034, in async_set_percentage File "/config/custom_components/xiaomi_miio_fan/fan.py", line 619, in _try_command File "/config/custom_components/xiaomi_miio_fan/fan.py", line 2090, in set_speed File "/config/custom_components/xiaomi_miio_fan/fan.py", line 1034, in async_set_percentage File "/config/custom_components/xiaomi_miio_fan/fan.py", line 619, in _try_command File "/config/custom_components/xiaomi_miio_fan/fan.py", line 2090, in set_speed File "/config/custom_components/xiaomi_miio_fan/fan.py", line 1034, in async_set_percentage File "/config/custom_components/xiaomi_miio_fan/fan.py", line 619, in _try_command File "/config/custom_components/xiaomi_miio_fan/fan.py", line 2090, in set_speed
Could you enable the debug logging and provide another log capture?
Settings -> Devices & services -> Xiaomi Miio -> Enable debug logging (last item of the left tile)
I've pushed another fix. Please call the install update
service another time, restart HA and give it another try.
Ok the log before the update
home-assistant_xiaomi_miio_fan_2024-08-31T14-29-15.682Z.log
The log after the update
home-assistant_xiaomi_miio_fan_2024-08-31T14-35-00.013Z.log
Unfortunately now it is back to the old behaviour of 25, 50, 75 and 100%
Interesting. I have to think about it. :-)
Take you time, while I enjoy the sunshine outside. π
It's confusing the p18
behaves different to the p33
. Could you provide another debug log of the p18
? Could you provide some screenshots too? Which lovelace card do you use exactly?
Here is the log for the P18
home-assistant_xiaomi_miio_fan_2024-08-31T15-04-03.817Z.log
I would expect the P33 and P18 to be equal, because the only difference seemed to be the battery. But apparently they are different.
For the testing I am not using any card. I just click on the entity in the integration and use the slider that pops up.
The living room fan is the P33
The strange thing is, all the other features are working fine, like setting the angle, the timer etc etc.
What is strange, is that the mode shows up as Normal with a Capital N for the P33, but a small N for the P18
`type: vertical-stack cards:
Note for myself:
Migrate away from speed
parameter to percentage
vs. preset_mode
.
I have both a dmaker.fan.p33 and a dmaker.fan.p18.
The dmaker.fan.p18 I can set from 1 to 100 %
The dmaker.fan.p33 can only be set to 25, 50, 75 and 100%
I have used the model: dmaker.fan.p18 option in the configuration to force it to think it is a dmaker.fan.p18 (the only difference should be the battery). But that does not seem to work either.