The subject states it all.
I just don’t see what it does, it must be me.
My understanding of PLEG & Conditions was that Conditions where always updated when an Expression updated.
Logically, if they update automatically, then why do we have Repeat?
I’ve played around with my PLEGS, checked some Conditions to Repeat and unchecked them several days later and notice no change. I’ve re-read Rex’s brilliant work on PLEG Basics, but I’m still not the wiser. ???
Every time any variable in your condition changes … The condition is re-evaluated. If the condition changes from false to true as part of this evaluation , then the actions are fired.
In some cases the condition may already be true before this evaluation. If you still want the actions to fire …then set the repeat button.
A simple example is:
AnyLight: L1On or L2On
Put An action on this to generate an alert or toggle some other light.
Start with both off … Then turn one on at a time.
You will see different behavior based on the repeat setting.
So would the rule be if using “OR” to use repeat?
What he’s saying is (with respect to the example he gave):
AnyLight: L1On or L2On
If L1On is true, and L2On BECOMES true:
Repeat unchecked: The event will NOT fire. The condition is already true (because L1On is true) and does not become “more true” if L2On becomes true subsequently.
Repeat checked: The event WILL fire. The condition is re-evaluated when L2On becomes true and since the overall condition is true, the condition is evaluated as true.
Now (and Richard, correct me if I am wrong) if both L1On and L2On are true, and you turn L2 off:
Repeat unchecked: The event will NOT fire. The condition is still true (because L1On is true).
Repeat checked: The event WILL fire. The condition is re-evaluated and since the overall condition is true, the condition is evaluated as true.
[quote=“JoeTomasone, post:4, topic:181782”]snip
Now (and Richard, correct me if I am wrong) if both L1On and L2On are true, and you turn L2 off:
Repeat unchecked: The event will NOT fire. The condition is still true (because L1On is true).
Repeat checked: The event WILL fire. The condition is re-evaluated and since the overall condition is true, the condition is evaluated as true.[/quote]
Wouldn’t the expression re-evaluate when you turn L2 Off?
I can see it IF L1 was already Off, the Condition wouldn’t change (As you put it, it can’t get truer).
So would the rule be if using "OR" to use repeat?
There is NO rule … there are your requirements requirements …
Use of OR is an example where you might consider setting the REPEAT … there are other cases as well.
If you want a general rule … leave it OFF … and if things do not work as expected … you need to review the status report … to see why a rule may not have fired … and decide if you want to turn the REPEAT option on.