Update groveStreams.groovy
[smartapps.git] / official / lighting-director.groovy
index a5906d472fea2d1bbe37339439cdc76db4f49d39..5f42ace64ba39a3d369c64a5a046842cd109b0fa 100755 (executable)
@@ -263,6 +263,7 @@ def initialize() {
        midNightReset()
 
        if(A_motion) {
+               //subscribe(A_motion, "motion", onEventA)
                subscribe(A_motion, "motion", onEventA)
        }
 
@@ -428,13 +429,13 @@ def unlockDetected = false
 def result = false
 
 if (motion) {
-       if (motion.latestValue("motion").contains("active")) {
+       if (motion.latestValue("motion") == "active") {
                motionDetected = true
        }
 }
 
 if (acceleration) {
-       if (acceleration.latestValue("acceleration").contains("active")) {
+       if (acceleration.latestValue("acceleration") == "active") {
                accelerationDetected = true
        }
 }