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