Error Property 'SmartSense Multi' too ambiguous for this device

So I’m trying to convert the Ridiculously Automated Garage Door Opener to notify me if everyone is out of the house and someone unlocks or opens a door in the house.

I’m running into a problem that I can’t figure out where the variable “state” is declared. I’ve been assuming it’s some sort of system defined global, but when I do that, I get errors when I try to do a comparison operator against it. So:

		if (result == false) {
			if (!<strong>state</strong>.openDoorNotificationSent && now() - currentSensor.latestValue.date.time > thresholdMinutes * 60 *1000) {
				def msg = "${currentSensor.displayName} has been open for ${thresholdMinutes} minutes"
				log.info msg
				sendPush msg
				if (phone) {
					sendSms phone, msg
				}
				//state.openDoorNotificationSent = true
			}
		}
		else {
			//state.openDoorNotificationSent = false
		}

in the case above, in referring to state, I get:

error Property ‘SmartSense Multi’ too ambiguous for this device

Any ideas? I can paste the entire routine in here, but it’s sort of torn apart while I try to get this particular script to work.

Ignore me, I wasn’t passing an attribute to latestValue and so it was unhappy. Now on to the next problem ;-).