Triggering device based on temperature

The method:

If
AC panel guest OR AC pan Main (either unit)reads 100 degrees or over
or
the temperature outside is 95 degrees or over
then
Turn on Attic Fan

Else
Attic Fan off

So, will the attic fan turn off if all statements are false?

No. When any trigger is true your actions will execute. If you want the fan to turn off once they are false you would want to add an IF statement to test for those conditions with the Off command inside that IF statement.

Also you should put an END-IF on what you have at the very bottom as a good practice.

1 Like

With the current info in the rule, I think the easiest fix would be to change the trigger to trigger on "changed" values, so any time any of those values change it triggers the rule. The IF/ELSE would then send an ON or OFF based on the conditions you set on the IF block.

This might cause a lot of On/Of hits to your attic fan device, which may or may not be a problem.

Another option would be to get rid of the "IF" in the actions, just turn the fan on straight away as it has already been proven by the trigger. After that you could do a wait for conditions, and have it wait for the temps to get below where you want it off, then send an off command.

Another option would be to remove everything from the action except the ON command. Then make a separate rule with your conditions for turning off, and send the OFF command.

@tivomaniac SO i would need to create the same conditions but reversed?

@jtp10181

Like so?

Get rid of the end-if I think thats leftover from before.

Your wait for events you probably mean to use "AND" logic, otherwise if the weather triggers it for example, but the other two devices are less than 100, it would turn on and then immediately turn on.

I think you want it to run until ALL the conditions are below your set points, so that would be AND in the wait for conditions.

Also, you may want to drop your turn off limits a little bit, so you do not get into a state where it is cycling repeatedly. Just drop them a degree or two so there is a buffer before it turns back off again.

I have made the adjustments--- I was worried about the chatter affect---- I have tested this and it seems to work.

Thank You -- steep learning curve

Another thought is to add local variables such that you can tweak the behavior without major edits in the code itself.

Yes good point, since I just happened to post it here is an example of using a variable for a temp. I figured if I wanted to adjust my limit I would only have to edit the variable this way.

I'd add a Required Expression of Attic Fan being off. That way once it fires and turns the fan on it will not trigger again until the fan has turned off. Presumably via the wait that you in the actions.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.