creating eventsSince for ContactSensor and AeonKeyFobs + commenting runAfter method...
[smartthings-infrastructure.git] / Methods / unschedule.groovy
index 322d80583d785a5631c6b7245495d05f67f56c2e..22ff9228c2076f687474babaeded680bb2a68f25 100644 (file)
@@ -1,18 +1,29 @@
 /////////////////////////////////////////////////////////////////////
 ////unschedule(func)
 def unschedule(Closure functionToUnschedule) {
 /////////////////////////////////////////////////////////////////////
 ////unschedule(func)
 def unschedule(Closure functionToUnschedule) {
-       for (int i = 0;i < timersFuncList.size();i++) {
+       /*for (int i = 0;i < timersFuncList.size();i++) {
                if (timersFuncList[i] == functionToUnschedule) {
                        if (timersList != null)
                                timersList[i].cancel()
                }
                if (timersFuncList[i] == functionToUnschedule) {
                        if (timersList != null)
                                timersList[i].cancel()
                }
-       }
+       }*/
+}
+
+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() {
 }
 
 
 def unschedule() {
-       for (int i = 0;i < timersFuncList.size();i++) {
+       /*for (int i = 0;i < timersFuncList.size();i++) {
                if (timersList != null)
                        timersList[i].cancel()
                if (timersList != null)
                        timersList[i].cancel()
-       }
+       }*/
 }
 }