I ordered a Sonoff dual with the intention to use it as a two speed fan controller for a bathroom fan, using Tasmota off course.
I connect the low speed wire to output1 and the high speed wire to output2.
I don’t think the two output can be active at the same time so whenever output 1 is on, output 2 shouldn’t. I solved this with this rule:
rule1 on Power1#State=1 do power2 off endon on Power2#State=1 do power1 off endon
This seems to work, great. Now when I got to the Home Assistant side of this I got confused. A fan item seems to have only one state and command topic. But the Sonoff dual requires me to send the commands to a topic ending in POWER1 or POWER2.
Is my idea even doable with one device in HA ? Or do I need to drop the fan item and implement it with separate switches for high and low speed ?
PS I also played with publishing a separate topic using this rule:
rule2 on Power1#State=1 do publish stat/sonoff-afzuiging/speed LOW ON endon on Power2#State=1 do publish stat/sonoff-afzuiging/speed HIGH endon
So I could track the speed topic in HA, this works but I haven’t thought out how I could determine the off state (which is POWER1 and POWER2 off). Second, this doesn’t give me a global command topic.So this still doesn’t help me.
Ideas are welcome
Perhaps a template fan?
Thanks, Nick.
Today I’ve been fiddling with this template fan but it seems very complex with using binary sensors for speed and state storage in HA. I have a feeling this should not be how the smart HA creaters have thought this out. Also, the documentation about template fan seems very basic.
In my head it is dead simple: a fan icon with 3 states:
- off (power 1 and 2 off)
- low (power1 on and power2 off)
- high (power1 off and power2 on)
I know this is long dead now but I do this with my whole house fan with an input select. I do have 2 entities for each controller