Need some help tweeking an app


#1

I would like to modify a current Smart App. The app currently turns my lights off by dimming them to zero percent. This creates issues when I turn a dimmer on. The dimmer will turn the light on at zero percent. I have to adjust the level for the light to come on. Here is the code

def sunriseHandler() {
log.info "Executing sunrise handler"
switches?.setLevel(0)
state.sunPosition = “up”
}

Instead of .setLevel(0) I want to turn off the switch


(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy) #2

Change the line to…

switches?.off()


#3

Works perfect. Thanks