Way to disable button if it's already active?

Hello, I was wondering if there is a way to disable a button if it has already been activated. My STHM disarm button is being pressed by my son who hasn’t figured out that he doesn’t need to disarm a system that is already disarmed. This causes the button to go back to appearing off as opposed to on. Just wondering if there was an easy way to only enable the button if the system needs to be disarmed. Thanks.

Can you share some more details about how you have things setup?

It sounds like you’re probably using a virtual switch along with an automation in the SmartThings mobile app to connect it to STHM. Does the automation only work when the switch gets flipped on and does nothing when the switch gets flipped off?

It feels a bit redundant, but you could map the status of the switch to a true/false variable (for display purposes only). Variable tiles have the ability to change their click Action (Tap) to Open Hyperlink which opens up a cool option… you can use a special $.runRule("XXXX") hyperlink syntax to run a rule that only ever sends the ‘on’ command -or- conditionally sends the on command only when the switch is off (or variable is false).

1 Like

Both of those statements are correct. I also have a PIN keypad come up when you want to disarm it.
As for your idea, I will try playing around with it. Thanks.

1 Like

I think I got it working, Thanks for input.