From: Seyed Amir Hossein Aqajari Date: Tue, 6 Aug 2019 19:08:17 +0000 (-0700) Subject: Update double-tap.groovy X-Git-Url: http://plrg.eecs.uci.edu/git/?p=smartapps.git;a=commitdiff_plain;h=72a843684a9d9bf86900740129afc246cdedc13d;hp=8a56afd7669acbe3e241bdb67a03f8f6a079d76a Update double-tap.groovy --- 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} }