projects
/
smartapps.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Changing remote branch to PLRG Git server.
[smartapps.git]
/
official
/
the-big-switch.groovy
diff --git
a/official/the-big-switch.groovy
b/official/the-big-switch.groovy
index e631fa013ee7405d455240e67efb8f1dd4f1b5c3..e566e66b356eb0a0372eeab856b2496920c341b8 100755
(executable)
--- 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
def onHandler(evt) {
log.debug evt.value
- log.debug onSwitches()
- onSwitches
()?
.on()
+ log.debug onSwitches
1
()
+ onSwitches
1()*
.on()
}
def offHandler(evt) {
log.debug evt.value
}
def offHandler(evt) {
log.debug evt.value
- log.debug offSwitches()
- offSwitches
()?
.off()
+ log.debug offSwitches
1
()
+ offSwitches
1()*
.off()
}
def dimHandler(evt) {
}
def dimHandler(evt) {
@@
-80,14
+80,14
@@
def dimHandler(evt) {
dimSwitches?.setLevel(evt.value)
}
dimSwitches?.setLevel(evt.value)
}
-private onSwitches() {
- if(switches && onSwitches) {
switches + onSwitches
}
- else if(switches) {
switches
}
- else {
onSwitches
}
+private onSwitches
1
() {
+ if(switches && onSwitches) {
(switches).findAll{it} + (onSwitches).findAll{it}
}
+ else if(switches) {
(switches).findAll{it}
}
+ else {
(onSwitches).findAll{it}
}
}
}
-private offSwitches() {
- if(switches && offSwitches) {
switches + offSwitches
}
- else if(switches) {
switches
}
- else {
offSwitches
}
+private offSwitches
1
() {
+ if(switches && offSwitches) {
(switches).findAll{it} + (offSwitches).findAll{it}
}
+ else if(switches) {
(switches).findAll{it}
}
+ else {
(offSwitches).findAll{it}
}
}
}