Luminance sensor, semi-outdoor, being averaged by Averaging Plus ( thanks @bptworld )
Want a trigger in RM (w/ Required Expression - night mode) on any reading level some prescribed delta above that average
But... want to filter out lightening events which I'm satisfied with assuming are of duration 2 seconds or less (vs illumination by flashlight or headlights we'll assume are OVER 2 seconds in duration.
Am I going to get the granularity of time & evaluation necessary, and is a WAIT in a Conditional Statement the way to do this?
As @dylan.c mentioned Sticky Trigger, nice feature...
Using that -
would the prescribed level threshold start the evaluation
and then the count to 2 seconds would proceed
AND IF the level was still over the threshold by the end of that time window I'd get a triggering?
Even as short as 2 seconds this would work (assuming it might actually have some overhead that pushed it to 3) ?
EDIT: Hold the bus I just remembered that this device isn't even updating that quickly...it's giving a new value no faster than every 7-8 seconds at best. So I guess if I employed this I'd have to be satisfied with catching say 8-10 seconds of illumination bump over the average. That could be enough to alert to headlights or a flashlight shining on/in and avoid the false triggering by lightening.
Question still stands if Sticky Trigger is the tool.
Thanks for the brief on what you've done. In this case I actually WANT to trigger on flashlight & headlights as neither should be illuminating this area on the property unless it's me. What I did want to avoid is lightening flashes causing unwarranted triggering.
According to google a long lightning flash is 200 ms. I wonder if a lux sensor will sense and respond to that short a duration. You might want to try a test and see how fast you have to pass a high intensity flashlight across your lux sensor to have it respond and send a message to the Hub.
I have a "Mijia Lux Sensor" and since it is battery operated it only responds periodically.