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)
}
}
delay += onFor
log.trace "Switch off after $delay msec"
- switches.each {s, i ->
+ switches.eachWithIndex {s, i ->
if (initialActionOn[i]) {
s.off(delay: delay)
}