Update laundry-monitor.groovy
authorSeyed Amir Hossein Aqajari <amiraj.95@uci.edu>
Sat, 10 Aug 2019 20:19:44 +0000 (13:19 -0700)
committerGitHub Enterprise <noreply@github.uci.edu>
Sat, 10 Aug 2019 20:19:44 +0000 (13:19 -0700)
official/laundry-monitor.groovy

index a76278e..323b455 100755 (executable)
@@ -96,7 +96,7 @@ def checkRunning() {
 
                        def cycleTimeMsec = cycleTime ? cycleTime * 60000 : 600000
                        def duration = now() - state.startedAt
-                       if (duration - fillTimeMsec > cycleTimeMsec) {
+                       if (/*duration - fillTimeMsec > cycleTimeMsec*/true) {
                                log.debug "Sending notification"
 
                                def msg = "${sensor1.displayName} is finished"
@@ -158,7 +158,7 @@ private flashLights() {
                def delay = 1L
                numFlashes.times {
                        log.trace "Switch on after  $delay msec"
-                       switches.eachWithIndex {s, i ->
+                       switches.each {s, i ->
                                if (initialActionOn[i]) {
                                        s.on(delay: delay)
                                }
@@ -168,7 +168,7 @@ private flashLights() {
                        }
                        delay += onFor
                        log.trace "Switch off after $delay msec"
-                       switches.eachWithIndex {s, i ->
+                       switches.each {s, i ->
                                if (initialActionOn[i]) {
                                        s.off(delay: delay)
                                }