One challenge I see with this is:
What if someone grabs that tissue in 15 seconds… They pop in, grab it, and close the door on the way out. At the 20 second mark, the door will be closed, so the program will think the toilet is currently being used. AKA, Leave the light on until the door opens next.
It almost sounds like you want the motion sensor to be disabled the instant motion is detected.
(and ironically, re-enabled the instant the room is empty)
The trick though, will be in “guesstimating” the times used to determine whether the room is occupied or not. Unfortunately, I do not see a 100% success rate for all users & cases. You are going to have to choose a cutoff time at some point.
- If the delay is too long, then the quick pop-ins may leave the light on for hours at a time.
- If the delay is too short, then means slow walkers may be in the dark at the 2 min mark (until they wave their hand)
