Temporarily Disable an app

I did this in a few apps by adding an active option in the SmartApp setup. If I want to disable it, I just go into the SmartApp and mark it inactive. Example preference:
section(“Monitor Status”) {
input “enableAlerts”, “bool”, title: “Enable Alerts?”, defaultValue: true
}

Then in my updated() function, I have:
if (enableAlerts) {
subscribeToEvents()
}

1 Like