Okay, so you’d set up a timer that was accessible from multiple rules. When the sensor changes to “occupied”, start the timer. When the sensor changes to “unoccupied”, cancel the timer. If the timer runs to completion, do whatever was wanted.