Update smart-light-timer-x-minutes-unless-already-on.groovy
authorSeyed Amir Hossein Aqajari <amiraj.95@uci.edu>
Fri, 9 Aug 2019 19:54:42 +0000 (12:54 -0700)
committerGitHub Enterprise <noreply@github.uci.edu>
Fri, 9 Aug 2019 19:54:42 +0000 (12:54 -0700)
official/smart-light-timer-x-minutes-unless-already-on.groovy

index 1af9a2d..590fe4a 100755 (executable)
@@ -131,10 +131,10 @@ def scheduleCheck() {
        log.debug "schedule check, ts = ${state.inactiveAt}"
     if(state.myState != "already on") {
        if(state.inactiveAt != null) {
-               def elapsed = now() - state.inactiveAt
-            log.debug "${elapsed / 1000} sec since motion stopped"
-               def threshold = 1000 * 60 * minutes1
-               if (elapsed >= threshold) {
+               //def elapsed = now() - state.inactiveAt
+            //log.debug "${elapsed / 1000} sec since motion stopped"
+               //def threshold = 1000 * 60 * minutes1
+               if (/*elapsed >= threshold*/true) {
                    if (state.myState == "active") {
                        log.debug "turning off lights"
                        switches.off()