Thanks for your time!! That helps.
So I now have an app.
I have an input:
input name: "lightDevices", type: "capability.switch", title: "When these lights are switched...", multiple: true
I subscribe to it on the updated() method:
subscribe( lightDevices, "switch.on", "mySwitchOnHandler", [filterEvents: false] )
Then I log on my handler:
def mySwitchOnHandler(evt) {
log.trace evt.device
log.trace evt.value
log.debug evt
}
- How do I know what values are available in the
evt
response of mySwitchOnHandler()? I know there is .device and .value. Anything else in the object?
- Am I able to query the states of the additional values that were set in the input handler? Say I selected five switches in the input; but only one is being described in the handler. What is the best way to determine the states of the other four switches that were assigned to the input?
Here is my use-case:
- I have five lights that take up too much space on my main dashboard page. I have a heavily modified dashboard using fades between pages instead of additional dashboard links.
- I moved the five lights to their own dashboard page.
- On my main dashboard, I'd like a single icon that displays the status of each light.
- If any one of the five lights are "on", the tile should be "on".
- If all of the lights are off, the tile should be "off".
( I handle the last two with a class on the div container of the tile)
The issue, I think, is that I need to know the state of all five devices in order to build the tile html structure.
