SmartThings IDE ‘Events’ log shows duplicate events


(Mark C) #1

I have a custome DH which seames to be sending duplicate events is this a codeing issue or just how the IDE shows things some time. but its not every time. i do have a state counter
wich i have tryed moving from ‘on’ to ‘update’ as its also called in the ‘off’ do i thought i shoulod define it once. however all that it seams to have done is duplicate the updated/update wich i hadnent noticed before. Any advice?
def on() {
//state.counter = state.counter
log.info “Executing on”
to
def updated() {
log.info “updated”
unschedule(refreshRate)
unschedule(off)
unschedule(on)
runIn(02, update)
}

def update() {
log.info “update”
state.counter = 0
image