I feel this should be simple, but I can’t get it to work right. Often at 9am it’s still dark enough outside to want an inside light on (despite it being after sunrise).
I’m trying to do this with the built-in Routines feature. What appears to be happening is that the light will turn on, but only if illuminance transitions below 150 during the 9am-9pm timeframe. Meaning it has to brighten up above that threshold (unlikely on a winter morning), and them dim below 150 for the Routine to finally trigger.
Is there anything I can tweak in the Routine to fix this? I’m trying to avoid over-complicating it with virtual switches.
BTW the “For 1 minute” was just me trying various settings - the behavior is the same either way.
I tried that, but it won’t let me remove precondition from the time range clause (the option is not shown at all) and if I change the illuminance clause to a precondition it won’t let me save because now I don’t have any non-preconditions.
How are you using location modes? At our house, we have something very similar, but instead of using a specific time frame, we have it set to run during our “home” mode, which is set from sunrise to sunset as long as someone is home. So it’s our daytime light rule.
They are quick routines, which are available through a slightly different architecture if you have an android phone. I don’t think they are available on iOS phones. They’re supposed to be the most common choices for that device.
I have a separate virtually-identical routine to turn the light back off if it gets light during the timeframe but that’s not the issue. Turning off if bright works for the most part because on any given day the brightness will usually at some point cross the 200 threshold that I have for turning the light back off again.
It is the turning on part that is giving me problems. My routine is identical to your first screenshot, but if illuminance is already below the threshold (150) at 9:01 am (which it often is in winter) it does not turn the light on, and will never turn the light on until the illuminance goes above 150 and then drops below 150.
I would create a virtual switch, called “is light outside” or “is dark outside”, and put all the rules about what that means into routines that turn it on and off accordingly. Then another rules I would just look at the state of the virtual switch rather than having that logic spread out everywhere.
I do something similar to define what is “Nighttime” and then use that as a precondition to determine the behavior of motion detection and button press on my GE Motion/Dimmer switches. Works really well and allowed me to transition off of Smartlighting with the added benefit of the Routines running locally.