How to Make a rule to do this

I think this would work, try and see

I guess what I am wondering. If the condition is false will it keep looking at the false action until the temp gets above 40? Or will it just check when the temp goes above 37 and then not do anything else till the temp drops again?

Another thought. Have 2 conditions. If temp is <37 OR temp is > 40 then..
And under true actions have the If statements???

No...the rule only executes the action when the truth of the rule changes. So, I am not sure that this rule will work. The true action will only execute when the rule changes from false to true. not everytime the rule is evaluated.

Since this rule is conditions based and not a trigger, the way I interpret how I wrote that is if the "temperature condition" is below 37 the rule will become true and turn on switch. And since the False action has a "conditional action" if the temperature is above 37 the "rule" will be false but the "action" for false to run should not fire until temp is >= 40 turning the switch off.

Pretty sure that is how that works.

How About this one??

Mistake in this one as that first On: Garage Heat shouldn't be there.

You would need to use another wait again, the conditional action will not work.

Condition: Temp <37
Rule: Temp < 37
True Action: Turn on Light
False Action:
Wait for temp >=40
Turn off light.

But I still think this is better done in 2 rules. The wait is not intended to be left hanging out there forever.

Yeah I wouldn't want to use a wait as it could be days or weeks. Depends on how cold it gets. I mainly do this to keep some pipes from freezing. At least I have time to mess with it. Don't expect it to get cold for a few months....

You don't think the OR conditions will work?

I would just use two rule. Much easier.

Ahhh, but that takes all the fun out of it...:grin:

@waynespringer79 @Ryan780 @j715, I thought @waynespringer79 method should work. So I created a rule and watched the logs as the temps fell and rose.

As you can see, the IF statement in the False Action went to TRUE, however the rule did not fire at all. I've always thought that a non-triggering rule evaluated whenever some event or status changed (i.e. temp change), but apparently it's not the case.

The logs to show each change and evaluates as False, but it never would get to the Action piece of the rule.

Ya I thought about this for a bit......apparently ONLY whenever the "conditions" First become true and false then it will evaluate the conditional actions, but it won't evaluate them UNLESS the conditions become true or false not during each true/false event...

It would be sweet if it did. I have never really given these types of rules much thought, but messing with this got me to thinking about other possibilities.

It appears to me that there isn't much difference, if any, between a condition rule and a trigger rule. In both case when the 'event' becomes true or false the rule is evaluated. So even in a condition rule it seems to me that it is triggered by the condition.

I can see the difference in a triggered rule as when the event occurs then the conditions are evaluated.

Let me know if I don't understand this correctly.

Correct when the trigger event happens (on a triggered rule to be clear) the rule is evaluated and true or false actions are ran every time. The trigger can be anything so doesn't need to be one of the conditions.
Where as a RULE is ran on each change of any of the condition states, but only runs the true or false actions on change of rule truth. Ie if it's false and the conditions are evaluated again and it equates to false nothing happens.

2 Likes

Actually, it's not "triggering" at all. The actions happen on rule truth change, as I've said. The rule is re-evaluated every time there is a change in temp but the true actions only happen when the truth changes from False to True and the False actions only happen when it changes from True to False. This is very basic RM functionality.