"to determine whether to turn on or off the devices.") {
if (switch1 || masterSwitch) {
- input "masterSwitch", "enum", title: "Master switch", options: switch1.collect{[(it.id): it.displayName]}, required: false
+ //input "masterSwitch", "enum", title: "Master switch", options: switch1.collect{[(it.id): it.displayName]}, required: false
+ input "masterSwitch", "enum", title: "Master switch", options: switch1.collect{[(it.id)]}, required: false
}
if (lock || masterLock) {
- input "masterLock", "enum", title: "Master lock", options: lock.collect{[(it.id): it.displayName]}, required: false
+ //input "masterLock", "enum", title: "Master lock", options: lock.collect{[(it.id): it.displayName]}, required: false
+ input "masterLock", "enum", title: "Master lock", options: lock.collect{[(it.id)]}, required: false
}
if (garageDoor || masterDoor) {
- input "masterDoor", "enum", title: "Master door", options: garageDoor.collect{[(it.id): it.displayName]}, required: false
+ //input "masterDoor", "enum", title: "Master door", options: garageDoor.collect{[(it.id): it.displayName]}, required: false
+ input "masterDoor", "enum", title: "Master door", options: garageDoor.collect{[(it.id)]}, required: false
}
}
section([mobileOnly:true]) {
log.trace "currentStatus($devices, $master, $attribute)"
def result = null
if (master) {
- result = devices.find{it.id == master}?.currentValue(attribute)
+ //result = devices.find{it.id == master}?.currentValue(attribute)
+ result = devices.find{"[" + it.id + "]" == master}?.currentValue(attribute)
}
else {
def map = [:]