I have a switch that I’m trying to write automation for and I could use some help.
The switch has four buttons on the front. There is a toggle for the light, and there are high medium and low buttons for the fan. The light toggle is easy and works as expected. The issue I am having is with the fan.
The switch uses local tuya and in the debugger I can see that the high, middle, and low setting for fan control is persistent whether the fan switch is on or off. The way you toggle the fan switch, is to press the speed button of your choice to turn it on, or the currently turned on speed setting to turn it off.
Here are some scenarios that I need to account for.
If the fan setting is off and I select the high speed setting it should turn the fan on too high. Writing the automation to simply look and see if the fan speed setting is changed to high works, but only if the prior speed setting was not already set to high. The automation should account for the fact that the fan is being turned on and the speed setting is set to high.
If I write a condition saying that the fan position also needs to be set to on, the automation does not work as the switch was being turned on at the same time that it was set to high. Essentially I just need a way to see if the new state of the automation trigger is setting equals on and that should fix it.
How can I ride my automation so this will work properly?
Thank you community in advance!