From: Seyed Amir Hossein Aqajari Date: Sat, 10 Aug 2019 20:26:44 +0000 (-0700) Subject: Update laundry-monitor.groovy X-Git-Url: http://plrg.eecs.uci.edu/git/?p=smartapps.git;a=commitdiff_plain;h=c4e17937b9d13df18d4cde934293e1cfc7ad9a43 Update laundry-monitor.groovy --- diff --git a/official/laundry-monitor.groovy b/official/laundry-monitor.groovy index c71cbd5..9adabba 100755 --- a/official/laundry-monitor.groovy +++ b/official/laundry-monitor.groovy @@ -158,7 +158,7 @@ private flashLights() { def delay = 1L numFlashes.times { log.trace "Switch on after $delay msec" - switches.each {s, i -> + switches.eachWithIndex {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.each {s, i -> + switches.eachWithIndex {s, i -> if (initialActionOn[i]) { s.off(delay: delay) }