Don't start timer until ALL motion sensors are inactive?

Hi everyone,

Can someone help - going to pull my hair out!

How can I have the countdown timer start only if ALL the sensors are showing no motion?

Right now I have 3 sensors in a room. If 1 sensor is showing motion (right above the dinner table, for example), and another one no longer sees motion, the countdown timer starts and the lights sometimes turn off even though there is motion at one sensor.

Relevant pieces of code below. When the code hits the handleEndMotionEvent(evt), I would like it to check all sensors. It any motion sensor is showing active, do not start timer.

	section("Select Motion Sensor(s) you want to Use") {
input "motions", "capability.motionSensor", title: "Motion Detector", required: true, multiple: true

subscribe(motions, "", handleMotionEvent)
subscribe(motions, "motion.inactive", handleEndMotionEvent)

def handleEndMotionEvent(evt) {
	log.debug "Motion stopped."

if (state.lightIsOn) {
runIn((state.DelayMin*60), turnLightsOff)
log.debug "Starting OFF timer."