I approached this a bit differently . ... outdoor lights on at sunset to 15% (just a glow), off at sunrise. BUT if motion is detected brighten to 99%, then back to original 15%.
In rule engine, I have a "sunset" rule and "sunrise" rule to turn the lights on (and off) (I'm not able to upload pics, so hope description is OK):
- at sunset, turn outdoor lights on to 15% (i just want a glow, not a full bright)
- at sunrise, turn outdoor lights to 0%
-both these rules have predicates of either "between sunset and sunrise" or "between sunrise and sunset"
- both rules have a trigger of "every 5 minutes" - this will become clear later
I have a motion rule where
- predicate is sunset - 20 minutes, and sunrise + 20 minutes (to avoid motion rules from firing outside that time. (I also have motion sensor lux setting set to 50 or 75 to avoid motion detection during the day, and lux update set to 30 minutes)
- trigger is motion
- set outdoor lights to 100%
- pause sunset and sunrise rules
and an inactive rule where
- resume rules "sunset" and "sunrise" delayed by 5 minutes. Since the sunset and sunrise are paused while lights are on bright, the 5 minutes interval stops counting. When they are resumed, the counter keeps going, and somewhere following that the lights "re-dim" to the lower level, or turn off if the sunrise threshold has been passed while lights are on.
I wish I could post pictures... Hope this helps someone...