I am trying to create what I thought was a simple rule.
The trigger is my front door being opened.
If the front porch light is one, I want it to be changed from 50% to 100% intensity.
If the light is not on, do nothing.
I can get everything working except for the condition. Regardless of what I try, if I open the front door, it sets the light to 50%, even when the light is off.
Any help for this Rules machine n00b would be greatly appreciated.
Well spotted/ noted that's problem with doing it from memory rather than building a real rule.
Also note that you don't NEED the open as a condition on the 1st rule (because it has to be true for the rule to trigger) but I added it to help clarify things.
Thank you for this statement. It helped clarify the relationship between trigger and condition. For a while I was wondering why we needed both trigger and condition.
John
FTR, I have a second rule that handles the close. Returns the list to 50% 30 seconds after the door closes.
Now I need to parameterize the original value in case I change it later on so that it just returns it to it's previous state before the door was opened.
You can do that with capture and restore. By using my 2nd example after cancel delays add capture this light then instead of 50% after else do restore after 30s cancelable.
"Simple condition" IF (front door light is OFF) Exit Rule
"Normal conditions"
IF (front door open) THEN
Cancel delays
Capture front door light
Dim: Front door light: 100
ELSE
Restore: front door light -> delayed 0:05:00 (cancelable)
END IF