JNS
13
If you're going to do this in RM I don't see a need for a private boolean. You would use 'cancel delayed actions' on the light going off.
If you want some rule machine examples here is a thread that discusses this. There are a whole bunch of other discussions regarding this as well.