I am not sure why this is so complicated in my head but it is:
I have a motion sensor in the kitchen that turns on a light when motion detected. However, the optimum position for other processes means it catches my movement if I walk past the kitchen door, even if going nowhere near the kitchen.
To attempt to solve this, I put an extra sensor pointing down from the door frame which will detect me as I approach the door. This would mean that, if I was working in the kitchen, and then left the kitchen, I could immediately turn off the light (currently I wait for 3 minutes with no motion but again passing the door restarts the clock). I guess that would be a trigger where
(1) movement had been detected in the kitchen for x seconds (minimum time to make a cup of tea!!) (2) movement was then detected by the door detector when leaving
(3) these 2 trigger my light switch off
(4) maybe clear the motion detectors
Likewise, approaching the door
(1) both the door and kitchen motion sensor are detecting movement where there was none before
(2) if they are both detecting together (within say 2 seconds, not after 2 seconds as I would then likely be walking into the darkness!) then that suggests entering the kitchen
(3) trigger my light switch on
I’ve done a few quite complicated automations but for some reason, these have flummoxed me. Any help appreciated.
Of course, I would also want to be sure the lights don’t turn off when I am moving in the kitchen.