I am trying to consolidate 3 rules into one in Rule Machine The below rule looks good to me except I don't have an action turning the porch light off at 10:00 and back on at 5:00. Is there an easier way to do this other than making a conditional that iss 9:59 to 10:01 and 4:59 to 5:01 to trigger those on off actions?
My recommendation would be to keep the triggers that you want to open the lights, and change the rule to:
Actions to run:
On: Front Porch Scene Controller
Wait for Expression: time is 10:00PM, timeout: 3 hours
Off: Front Porch Scene Controller
This will always turn off the light at 10pm, or 3 hours after it was last turned on, which ever comes first.
If you want the 3 hour delay to only occur between 10pm and 5am, you can change the wait expression to:
If time between 10pm and 5am, then
. Wait for event elapsed time 3 hours
Else
. Wait for Expression: Time is 10:00PM
Endif
3 Likes