Hi @myle and @lscosta90br
I’m doing a similar thing. I have a 3 speed fan and had this idea of using a sonoff 4ch to control it. Its almost finished! Since to select the speed you just connect the “live” wire to one of 3 wires inside the fan, and since sonoff 4ch/tamosta has “interlock” feature I just had to took off the fan control box and put the sonoff in place:
The live is connected to the common of each relay and each wire from the fan in the “Normally Open”.
Now the tricky part: how to configure HA? The “easy” way would be to use template fan, but I would have to create one switch for each speed and so on. The MQTT fan should be a better option, but there’s no single “set speed” topic (you have to turn on relay1, 2 or 3 to select speed). Any hints?