SmartApps Enable/Disable in SmartThings Mobile App

There have been multiple requests to allow a quick enable/disable of a SmartApp within the Mobile SmartThings App. This appears to be been done, but will only work if your SmartApp doesn’t resubscribe when the toggle is ‘disabled’.

Problem is, what is the event/variable to watch for when this Toggle is changed?

Most SmartApps have something like this:

def updated() {
unsubscribe()
initialize()
}

But they should be like:

def update() {
if (event.toggle == disabled) { //<----it’s this event I can’t find documented
unsubscribe()
}
else {
unsubscribe()
initialize()
}

}

Have you tried adding pausable: true to the SmartApp definition() to see if that helps out? I am just going by the fact that Notify Me When can be paused in the IDE and includes it, whereas webCoRE can’t be and doesn’t. It may be for something completely different but a lot of SmartApps use it.

That may have to do with the fact that Apps with OAuth endpoints cannot be paused by default since they’re always listening to an endpoint.

1 Like

I’ve enabled this, and re-published. I’m unable to find any documentation on this feature, and changing the toggle in the iOS App still just sends an Update() function to the API.