State Delay within DeviceType Help

I’m in the middle of programming my ADT system to interact with ST. I’ve gotten most everything to work fine but I’d like the motion sensor to delay before turning off “active” motion within my device type (just like the other motion devices do within ST).

I’m currently using a createEvent handler to do this now:

else if (msg.contains("04"))
        {
        	log.info "04"
        	result << createEvent(name: "hallMotion", value: "Active")
        }

I see that the Aeon Multisensor for example using the following code:

delayBetween([
		// send binary sensor report instead of basic set for motion
		zwave.configurationV1.configurationSet(parameterNumber: 5, size: 1, scaledConfigurationValue: 2).format(),

but I don’t fully understand how to convert it to something useful for my situation. Any help / suggestions would be great!