Changes in classes: new concept for latest value + all types of events generated...
[smartthings-infrastructure.git] / Methods / unschedule.groovy
index 322d80583d785a5631c6b7245495d05f67f56c2e..7f6ca1fdf920128f08737d042126e2675a6c810a 100644 (file)
@@ -9,6 +9,17 @@ def unschedule(Closure functionToUnschedule) {
        }
 }
 
+def unschedule(String nameOfFunctionToUnschedule) {
+       for (int i = 0;i < timersFuncList.size();i++) {
+               if (timersFuncList[i] instanceof String) {
+                       if (timersFuncList[i] == nameOfFunctionToUnschedule) {
+                               if (timersList != null)
+                                       timersList[i].cancel()
+                       }
+               }
+       }
+}
+
 
 def unschedule() {
        for (int i = 0;i < timersFuncList.size();i++) {