runIn functionality

Quick question,

In the following code, once a mode change event is triggered, runIn would kick in. But if the mode change event is triggered again, would the original runIn get reset and start again? I think it does, but just wanted to make sure thats the case

Assume XXXX is a number

def modeChangeHandler(evt) {
if (location.mode == “AwayMode”)

Yes, it will be overwritten/reset as long as you don’t specify [overwrite: false].

1 Like