Looking at this again, I think the best way to implement this is to use a single variable expressed as a contact sensor. You can do On/Off routines triggered by Closed/Open states, without the issue of the motion detector waiting for "no motion detected" to timeout. It's working well for me set up this way, there is about a 1-2 second lag on both on/off for the light controlled by the variable.