I’m creating this thread as a place to find assistance in programming the logic of the Rule Machine App. @bravenel - I see you doing a lot of updates every day and posting them in the [Release] thread, I figure this will help to keep it clean and not get hijacked… as much…
I’ll start!
I’ve set up some rules for my front porch lights. I haven’t figured out how to do with any less than “4” separate rules. I’d like to simplify this as much as possible.
What I want:
-
Lights come on 20 minutes prior to sunset, go off at 11 pm, and be set to 30%
-
When either my wife or I come home between sunset and 11pm, even if the other is already there, the lights go from 30% to 99% for 10 minutes. After 10 minutes they go back to 30%.
-
If it is after 11 pm and before sunrise, I want the lights to come on at 99% when we come home, and go off after 10 minutes.
Explanation of my Logic process in Rules I’ve created ~
Part 1 - Lights come on 20 min before sunset at 30% (Truth). They Go off at 11 pm (False).
Part 2 - App detects new presence and adjust the lights if they are at 30%. Lights go from 30% to 99% when one of us arrives between sunset - 20 and 11 pm. (Only used False on this one. That way it triggers when our presence comes home)
Part 3 - App detects lights at 99% and adjust the lights to 30% after 10 minutes. (False left blank)
Part 4 - Between 11:05 pm and Sunrise the app detects if the lights have come on (presence arrival after 11 pm turns on the lights, done in Part 2) and turns them off after 10 minutes.
My thoughts…
Part 1 turns the lights on from time A to time B
Part 2 detects presence and turns the lights to bright,
Part 3 detects lights on bright and dims them after 10 minutes. This one works for Part 1 time and after Part 1 time until sunrise
Part 4 detects presence after Part 1 time and turns the lights off.
Wow… I’m confused, but I think I actually need one more rule… Rule Part 1.1 - turns lights on from time C to time D only with presence detection
Ok, I’d like to simplify this… what are y’all’s thoughts???