Handle plain unlock
[smartthings-infrastructure.git] / Methods / subscribe.groovy
index b60cb4501457ad4bfad618d49072b9acd6c6b015..a387375c849ab7ff53354342977bf939ff4316c3 100644 (file)
@@ -21,7 +21,9 @@ def subscribe(Object obj, String event, Closure FunctionToCall) {
     } else if ((event == "mode")||(event == "mode.away")||(event == "mode.home")||(event == "mode.night")) {
        //This really should be fixed also...
        event = "Location"
-    }       
+    } else if (event == "unlocked") {
+      return
+    }
     
     int dot = event.indexOf('.')
     String name = ""
@@ -44,7 +46,9 @@ def subscribe(Object obj, String event, String FunctionToCall) {
        event = "contact"      //This really should be its own name
     } else if ((event == "mode")||(event == "mode.away")||(event == "mode.home")||(event == "mode.night")) {
        event = "Location"
-    }       
+    } else if (event == "unlocked") {
+       return
+    }
 
     int dot = event.indexOf('.')
     String name = ""