Update light-follows-me.groovy
authorSeyed Amir Hossein Aqajari <amiraj.95@uci.edu>
Fri, 9 Aug 2019 18:37:10 +0000 (11:37 -0700)
committerGitHub Enterprise <noreply@github.uci.edu>
Fri, 9 Aug 2019 18:37:10 +0000 (11:37 -0700)
official/light-follows-me.groovy

index ddc1a0af4fe8bfe2466b23f64bb27739ab2384d4..06f4fc1c866f93c99b72c0e6e8b81680cd445fca 100755 (executable)
@@ -60,9 +60,9 @@ def scheduleCheck() {
        log.debug "schedule check"
        def motionState = motion1.currentState("motion")
     if (motionState.value == "inactive") {
-        def elapsed = now() - motionState.rawDateCreated.time
-       def threshold = 1000 * 60 * minutes1 - 1000
-       if (elapsed >= threshold) {
+        //def elapsed = now() - motionState.rawDateCreated.time
+       //def threshold = 1000 * 60 * minutes1 - 1000
+       if (/*elapsed >= threshold*/true) {
             log.debug "Motion has stayed inactive long enough since last check ($elapsed ms):  turning lights off"
             switches.off()
        } else {