Knowing the previous mode in a mode change handler


(Anil) #1

In a mode change handler (subscribe(location, “mode”, modeChangeHandler)) is there a way for me to know the previous mode smartthings was in before changing to the new mode (evt.value)?


(Chris) #2

I think (still learning) that you’ll have to store the mode when it changes in the “state” object. So the next time it runs you can check what it was the last time.