From: Seyed Amir Hossein Aqajari Date: Tue, 6 Aug 2019 20:34:17 +0000 (-0700) Subject: Update the-big-switch.groovy X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=dce41b003e518943bbb6a48252d74d88d79104ea;p=smartapps.git Update the-big-switch.groovy --- diff --git a/official/the-big-switch.groovy b/official/the-big-switch.groovy index e631fa0..4dd1359 100755 --- a/official/the-big-switch.groovy +++ b/official/the-big-switch.groovy @@ -65,14 +65,14 @@ def logHandler(evt) { def onHandler(evt) { log.debug evt.value - log.debug onSwitches() - onSwitches()?.on() + log.debug onSwitches1() + onSwitches1()?.on() } def offHandler(evt) { log.debug evt.value - log.debug offSwitches() - offSwitches()?.off() + log.debug offSwitches1() + offSwitches1()?.off() } def dimHandler(evt) { @@ -80,13 +80,13 @@ def dimHandler(evt) { dimSwitches?.setLevel(evt.value) } -private onSwitches() { +private onSwitches1() { if(switches && onSwitches) { switches + onSwitches } else if(switches) { switches } else { onSwitches } } -private offSwitches() { +private offSwitches1() { if(switches && offSwitches) { switches + offSwitches } else if(switches) { switches } else { offSwitches }