I am getting and error which I have no idea what it means… new to Groovy but the script is fairly basic. Should turn on a light switch on and then after x seconds turn it off. After the x seconds I get the following error:
groovy.lang.MissingMethodException: No signature of method: scriptid.null() is applicable for argument types: () values: []
Possible solutions: url(), url(java.util.Map), dump(), now(), run(), dump()
thanks for that… so that being the case how can I handle this to turn off the switch that was turned on? How would turnOffSwitch now which switch to turn off?
Sometimes it is useful to pass data to the handler method. This is possible by passing in a map as the last argument to the various schedule methods with data as the key and another map as the value.
in your case it would be
runIn(60, turnOffSwitch, [data: [switch: device]])