Hello,
I am trying to build a app that I can control from the API. What I want to do is select a number of switches and then selectively turn them off… Everything is working how I expected except I can not find a way to only turn off one switch… switches.off(); turns them all off, and I can’t figure/find a syntax for switches.“switchName”.off(); This must be possible?? right?
This is the idea, where “switchName” is a name passed to the SmartApp via HTTP.
preferences {
section (“Allow external service to control these things…”) {
input “switches”, “capability.switch”, multiple: true, required: true
}
}
switches.“switchName”.off();