Hi guys
I’m struggling, but I think this should be possible with the regular HA tools, no?
So, I have the bathroom light turn on, upon philips motion sensor “becom occupied”.
Now of course I could have it wait 4mins, then switch it off. But reality showed that it isnt really practical. Sometimes people move, but when the 4 mins are over, they haven’t moved a while and the state of the philips motion sensor says: unoccupied.
So the light will turn off, even if somebody is sitting on the toilet haha.
=> so what I want to poll for is 4 minute “uninterrupted” non-occupancy. My idea was: Everytime the sensor senses occupancy, it resets a helper (4min timer) and starts it fresh. The timer ticks down, and always gets reset back to 4min, if there is movement.
If there is no movement for the entire 4mins, switch off the lights.
thanks tom
So you are saying, that in that script, if during these 2 minutes, there is motion, it will be set back to 2mins again. and again etc… until there has been 2 minutes for uninterrupted no-motion?