tuya-local
tuya-local copied to clipboard
Wilfa haze hu400bc humidifier turning off sound issue
There is some weird issue with this humidifier with this component, when I directly use tinytuya and set dps 8 false, the sound is off, but when I do it via home assistant, it makes a long beep sound, if I try many times from HA, it does work may be 1 in 10 times.
My guess is that when you turn off sound, all other async requests to read the state should wait for sound off request to be completed.
I could look into the code and figure out, but just putting this here if anyone knows what is the issue immediately.
In general, tuya devices need some time in between commands. They seem to be single threaded, and don't have much if any of a buffer in their networking stack. If this is from an automation, adding a delay of a couple of seconds between commands might help. From the UI it is a bit harder to control, but generally you just do one thing at a time, so there should be a bit of a gap between commands. There is some queuing in the code to try to avoid such issues, but it might not be working across multiple entities on the same device, and to keep things reasonably responsive in general the delay built in is not enough for the worst case.
Besides the last comment, in case this is due to a protocol incompatibility, 2022.12.1 just released allows to set the protocol_version manually. If you try different values, you may find that one works better.
Does this mean that the Wilfa Haze has a Tuya Firmware? How did you find that out?