Update smart-light-timer-x-minutes-unless-already-on.groovy
[smartapps.git] / official / smart-light-timer-x-minutes-unless-already-on.groovy
index 1af9a2d4285453213ea6176cb8c3b123153bf538..590fe4afea56255494b178a69f673af7049e4292 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()