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 984438de4f28d1c18ec0785680c17376bacf9a8e..5f42ace64ba39a3d369c64a5a046842cd109b0fa 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
        }
 }