From 3558599f9519a5c660a8a814f708b95b5a0ef216 Mon Sep 17 00:00:00 2001 From: Seyed Amir Hossein Aqajari Date: Fri, 9 Aug 2019 12:54:42 -0700 Subject: [PATCH] Update smart-light-timer-x-minutes-unless-already-on.groovy --- .../smart-light-timer-x-minutes-unless-already-on.groovy | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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() -- 2.34.1