Update lighting-director.groovy
authorSeyed Amir Hossein Aqajari <amiraj.95@uci.edu>
Sat, 10 Aug 2019 19:15:27 +0000 (12:15 -0700)
committerGitHub Enterprise <noreply@github.uci.edu>
Sat, 10 Aug 2019 19:15:27 +0000 (12:15 -0700)
official/lighting-director.groovy

index 984438d..5f42ace 100755 (executable)
@@ -429,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
        }
 }