From: Seyed Amir Hossein Aqajari Date: Fri, 9 Aug 2019 19:54:42 +0000 (-0700) Subject: Update smart-light-timer-x-minutes-unless-already-on.groovy X-Git-Url: http://plrg.eecs.uci.edu/git/?p=smartapps.git;a=commitdiff_plain;h=3558599f9519a5c660a8a814f708b95b5a0ef216 Update smart-light-timer-x-minutes-unless-already-on.groovy --- diff --git a/official/smart-light-timer-x-minutes-unless-already-on.groovy b/official/smart-light-timer-x-minutes-unless-already-on.groovy index 1af9a2d..590fe4a 100755 --- a/official/smart-light-timer-x-minutes-unless-already-on.groovy +++ b/official/smart-light-timer-x-minutes-unless-already-on.groovy @@ -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()