Hello community im a bit new here,
but here is the question already
I have simple pir sensor which activates lights on detection. and once detection is not present there is a timer for 2 min, which upon expiration turns the lights off(used automation UI to ). Well the system is not perfect in real life scenario, and I would like to upgrade it to function smth like this:
After the first mov.detection event the light goes down in 2 min, but if within lets say 15 sec after light automatically went down there is another mov detection event happen then lights auto off timer now is 10 min…. if it happens again then …. 30 min etc… If there no detection event were detected within
15 sec after lights auto off then shut off timer goes back to 2 min.
Feels like i need some global variables declared somewhere… If anyone can either help me with a script or give me a vector in the right direction.
(Running latest HASS on Pi4 and using espHOME plugin)
Thx!