Sleep n seconds in Device Type


(Ethomasii) #1

I have seen the RunIn method in a few SmartApps, but I can’t get it to work in a Device Type. In order to get the status of a certain device, I have to call two methods with about a second gap between the two calls. I can’t seem to figure out how to make it wait a second…


(Florian Z) #2

All the zwave devices use the delayBetween() function, which takes a list of commands, followed by an optional delay in milliseconds. I am unsure if the “list of commands” can be a list of closures or method handlers, but you could give that a try. Someone else might have a better solution for you.


(Florian Z) #3

On second thought, I am now doubtful that delayBetween() will do what you want, and I take back what I just said. It looks like it’s used to emit zwave commands on the hub, which is the only scenario in which the millisecond granularity makes sense to me :wink: