Apologies if this has been addressed before, I tried to search for it with no success though I cannot imagine that it hasn’t been addressed before.
I have a presence activated light automation that has a light level condition involved.
The problem I am having is that the light sensor is not very speedy in updating HA so if the light level is low enough, presence will trigger the automation and the light turns on as it should. However, if the person remains in the area long enough, the light sensor will pick up the light level after the light is turned on, then if the person leaves the room, is gone long enough for the light to turn off, but then returns to the room the light does not turn back on because the light level is showing as still too high from the last time the lights were on.
It seems to me that one way to address this is that instead of using the light level, to update a state periodically but only if the light has been off for at least 5 minutes which would be more than enough time to update the light level. If the light was on within the past five minutes then use the state as it was prior to the light turning on.
I suppose there may be a more elegant way to address this that I have not thought of. I’ve tried different settings, different conditions, etc. but the light level is the best determinant since there are several areas where time of day (sun) wouldn’t work. For instance, the upstairs hallway, if all bedroom doors are closed, would be quite dark even on the brightest sunniest day.
Bottom line here is that I’m not that good at coming up with more complex automations so I am hopeful that maybe someone has solved this issue previously and would be willing to share their solution.
Thanks in advance.