Hi,
With the following piece of code, it’s clear to me from the documentation that “alarmsign” has to be put in the preferences section (as showed). But how about “hkCurtainBig” ??
(at the moment, the simulator does not recognize this device in the smartapp, while I declared it as simulated device. I’m also investigating this issue.)
preferences {
section(“Title”) {
input “alarmsign”, “capability.switch”
}
}
def installed() {
svpInitialize()
}
def updated() {
unsubscribe()
svpInitialize()
}
def svpInitialize() {
subscribe(alarmsign, “switch”, handler)
}
def handler(evt) {
if(evt.value == “on”) {
hkCurtainBig.open()
hkCurtainSmall.open()
…
Thanks in advance!