Hi Job,
Below the flows I use to control my ceiling fan. I will post later on an electrical diagram, too
Back in the old Athom forum someone posted a similar solution and that’s where I got inspired from. You can probably use less flows by using other methods and maybe other forum member can give other ideas, or you can optimise the below yourself.
I used the following apps:
- Countdown (I created a countdown called MBed S2 timer, give it whatever name you wish)
- Better Logic (I created a variable called MBed S2 of type number)
- Virtual Devices (I created 4 VDs: MBed Fan Stop, MBed Fan Low Speed, MBed Fan Medium Speed and MBed Fan High Speed)
The reason for the VDs is because I can control the fan from other flows if I want.
I use 4 flows for Low, Medium, High and Stop which toggle the four VDs.
Then another four flows to toggle the real outputs of the 2x Double Relay units.
You can use only the first 4 flows and control the outputs of the double relay direct, again I prefer the VDs so I can control the fan by other means.
First flow is used to start the fan at low speed:
Remember from my previous post, one output of the one of Double Relay is not wired anywhere, I just use it as When condition. The corresponding S2 of this particular output, is wired into a momentary switch (wiring diagram to follow in another post).
So, when momentary switch pressed, output Turned on, AND variable MBed S2 is equal 0, THEN Turn on VD MBed Fan Low Speed, AND set variable MBed S2 to 1, AND Start countdown timer MBed S2 timer from 10 seconds, AND turn off after 1 second the above output (the one connected to nowhere)
The reason I turned it off is so it can be ready to be turned on again for the next operation.
Second flow is used to get the fan at medium speed:
This flow only works if the momentary switch is pressed before the countdown timer runs out (within 10 seconds) This is because if for example I set the fan to low and leave it there, I then probably prefer later on to Stop the fan without having to go through all the cycle low-medium-high and finally stop. This is the same for Medium speed.
So, when I press the button, the “nowhere” output turn on AND variable MBed S2 is equal with 1, AND countdown timer MBed S2 timer is still running (so the 10sec time has not elapsed) THEN turn off VD MBed Fan Low Speed AND turn off VD MBed Fan Medium Speed AND turn off VD MBed Fan High Speed AND set variable MBed S2 to 2 and adjust countdown timer MBed S2 timer back to 10 AND turn off after 1 second the above output (the one connected to nowhere)
Third flow is used to get the fan at maximum speed:
This flow is similar with the second flow, only difference is that after here I stop the countdown timer instead of adjusting it back to 10.
The fourth flow is used for stopping the fan regardless it is on low, medium or high speed, with the condition that the countdown timer is stopped.
The above only triggers the VDs. For each VD I have one flow to trigger the real output of the fan.
See below one flow for low speed, the rest are similar.
Man, this was a long post…
Hope this helps.
P.S. The above is mostly used for the good old manual control of a ceiling fan. In your case you can use two temperature sensors (top/bottom as per your post) and with a couple of flows, switch the speed of fan as required.





