Basically, the three fan speed switches are connected to a speed capacitor, similar to a 3 speed rotary control. It is configured internally to only have only one on at a time, with every selection turning off the previous one. On the website they mention both the Tuya App and Home Assistant. It paired immediately with Hubitat but only showed as a "device". None of the fan control drivers worked. I then tried the multi endpoint zigbee switch device. This didn't work, seeming to fire all the switches at once. I eventually found the Zemismart Zigbee Wall Switch Multi Gang custom driver which created the correct number of child devices and even allowed me to change the backlighting parameters. Using Rule Machine I then mapped a virtual fan device speeds to the the individual switches. Everything worked as expected.
My issue arose when I tried to write another rule to update the status of the virtual fan device if the fan was manually controlled from the switches. It seems to work but only for the first selection. If I then selected a different speed it switched back and forward two or three times (obviously caught in a loop between the two rules) and then ended up back on the original selection. Is there a method or conditions I can use to mirror the switches to fan speeds without causing conflicting commands?
Here's a screenshot of the fan control rule, from the virtual fan to the control switches. I have deleted the second rule because of the effect it had on the unit.
It feels like it is something that is not natively supported.... (based on the "device" type assigned)_ I will reluctantly drop @kkossev in the discussion as someone who may be able to provide some assistance, or at least more than me.
Did that driver create the component switches, or just one parent switch? It should create the children. Without the children created, the parent will turn them all on or off at once.
It has been awhile since I added one, but you might have to press Configure on the parent device to get the children created.
It did create four endpoints but switching any of them caused what looked like a cycling of all switches. It may be something to do with the built in logic in the firmware, where a fan button turns off one previously selected before turning on.
I have succeeded in getting the wall plate switches bound to the virtual fan speeds. It turns out all I had to do was add an extra condition in each action to check the current state of the device about to be commanded. For example if I physically turn on the fan medium switch the rule checks to see if the virtual fan speed is already set to medium. If it is nothing happens, if it's not then fan speed is set to medium. I know this is probably a simple to you regular coders out there, but I don't often have to write new rules. Most of the ones I use I wrote years ago.