preferences {
section {
input “switch1”, “capability.switch”, title: “Where?”, multiple: true, required: true
}
}
def installed() {
log.debug "Installed with settings: ${settings}"
initialize()
}
def updated() {
log.debug "Updated with settings: ${settings}"
unsubscribe()
initialize()
}
def initialize() {
subscribe(switch1, “switch”, switchOnHandler)
}
def switchOnHandler(evt) {
switch1.on()
log.debug “switch turned on!”
}
I can’t the simulator to turn the switch on (even though it should be on from the very beginning)
I’m thinking that the switch device handler I tried writing, but subsequently deleted is somehow still involved