X-Git-Url: http://plrg.eecs.uci.edu/git/?p=smartapps.git;a=blobdiff_plain;f=official%2Fthe-big-switch.groovy;h=4dd13595b538f4bdac1969b2d6d8ac72541284ac;hp=e631fa013ee7405d455240e67efb8f1dd4f1b5c3;hb=dce41b003e518943bbb6a48252d74d88d79104ea;hpb=a25cd5cdc4ca15d8eb233ae7d34b2d345a87010d 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 }