X-Git-Url: http://plrg.eecs.uci.edu/git/?p=smartapps.git;a=blobdiff_plain;f=official%2Fdouble-tap.groovy;h=766b1d4d12b2140ed66b9d0281919eb796991145;hp=596d4941b440c6671fc072fde06748e1dfd2dca5;hb=72a843684a9d9bf86900740129afc246cdedc13d;hpb=8a56afd7669acbe3e241bdb67a03f8f6a079d76a diff --git a/official/double-tap.groovy b/official/double-tap.groovy index 596d494..766b1d4 100755 --- a/official/double-tap.groovy +++ b/official/double-tap.groovy @@ -60,10 +60,10 @@ def switchHandler(evt) { if (evt.physical) { if (evt.value == "on" && lastTwoStatesWere("on", recentStates, evt)) { log.debug "detected two taps, turn on other light(s)" - onSwitches()*.on() + onSwitches1()*.on() } else if (evt.value == "off" && lastTwoStatesWere("off", recentStates, evt)) { log.debug "detected two taps, turn off other light(s)" - offSwitches()*.off() + offSwitches1()*.off() } } else { @@ -71,11 +71,11 @@ def switchHandler(evt) { } } -private onSwitches() { +private onSwitches1() { (switches + onSwitches).findAll{it} } -private offSwitches() { +private offSwitches1() { (switches + offSwitches).findAll{it} }