Ceiling Fan Rule

Evening All,

So I have been working on getting my kids rooms automated with their ceiling fans. The rule that I put together is:

Everything seems to be working fine. Where my question comes in is if one of them turns on the ceiling fan directly. How will this affect the rule itself?

Scott

if they turn on the fan manually and the temp changes, if it's under 69 it'll turn off the fan

1 Like

Yeah, basically what @dadarkgtprince said.

It does lead to some odd behavior sometimes though. You can get complicated and throw some state change detection or variables in to catch the edge conditions, but generally I like to use the "just try it and see how much it annoys me approach". If the kids play with the switches often, and the temp changes are infrequent, then you might want to put in some additional logic, but otherwise, I think what you have is good.

You can simplify it a little bit if you want though. Change Else-If to Else, and delete the rest of that statement. Its unnecessary.

That is,

ELSE
Off: Andrew's Fan
END-IF

If the temperature is not >74, then the fan turns off, otherwise it comes on. The default condition is off.

S.

In some rooms where I have automation and I want manual intervention to suppress it, I setup a rule where a button press disables the rule for a set period of time. (This is an Inovelli switch which allows this, but a Physical trigger in a separate rule could do this too.)

In his code though, there is a range of temperature where nothing will occur. Wouldn’t changing to an else instead of an elseif cause it to turn on and off more often?

2 Likes

Ah true. I misread that. Doh.

S.

1 Like

I just went through something almost exactly like this. I have a separate button controller that controls lights and fan speeds. So I setup another rule that if a button for the fan speed is pressed, it pauses the fan automation rule for 8 hours. Usually we run the fan at night and sometimes would just prefer it stay on instead of turn on and off.

You might be able to do something like that with a rule detecting if the fan was turned on or off manually and pause the automation rule for a few hours.