Smartthings location mode changes

Hi, I’m currently migrating from webcore, and a feature I find really useful when triggering on location mode changes is being able to look at what the location mode used to be. For example, I have a piston which fired when the location mode changes to Home, and changes away from Night. This runs my morning routines. Has anyone found an easy way to replicate this functionality? I started thinking about creating variables to track the previous mode, but I’m hoping there’s an easier way.

Yes you can easily do that by choosing Mode as your trigger and Changes to whatever mode you’d like.

I don’t think you’ve fully understand my question. I want a way to check which location mode it’s changing from, as well as too. So behaviour will be different going from Night to Home (morning) to going from Away to Home.

I’m not sure your solution provides that?

Variables was the first thing that hit me as well. I’m thinking you’d need one for the current value and one for the previous value. Then trap each mode change and copy the current value to the previous value before you repopulate the current value.

2 Likes

Sorry, misunderstood. Definitely would throw some variables in to track the mode and you should be good to go.

2 Likes