From: Seyed Amir Hossein Aqajari Date: Sun, 4 Aug 2019 20:00:56 +0000 (-0700) Subject: Update notify-me-with-hue.groovy X-Git-Url: http://plrg.eecs.uci.edu/git/?p=smartapps.git;a=commitdiff_plain;h=b23fd56249c63a41a6d2adcebe0596c60a660ae3 Update notify-me-with-hue.groovy --- diff --git a/official/notify-me-with-hue.groovy b/official/notify-me-with-hue.groovy index 8cfd296..76a687c 100755 --- a/official/notify-me-with-hue.groovy +++ b/official/notify-me-with-hue.groovy @@ -97,7 +97,7 @@ def subscribeToEvents() { } } -def eventHandler(evt) { +def eventHandler1(evt) { if (frequency) { def lastTime = state[evt.deviceId] if (lastTime == null || now() - lastTime >= frequency * 60000) { @@ -112,12 +112,12 @@ def eventHandler(evt) { def modeChangeHandler(evt) { log.trace "modeChangeHandler $evt.name: $evt.value ($triggerModes)" if (evt.value in triggerModes) { - eventHandler(evt) + eventHandler1(evt) } } def scheduledTimeHandler() { - eventHandler(null) + eventHandler1(null) } def appTouchHandler(evt) { @@ -195,4 +195,4 @@ def resetHue() hues.each { it.setColor(state.previous[it.id]) } -} \ No newline at end of file +}