Most basic app, but doesn't work

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

I believe there is something going on with the simulator as it is not working for me, too. Already created a support ticket and will let you know if I hear something from them.

Never trust the Simulator.

Publish “for me” and test on your phone saves a lot of headaches, even if it takes a little longer.

2 Likes

OK, that is what I’ll do for now on.

1 Like

Never trust Smartthings to get it right