Virtual Button Device Handler

Does anyone know where I can get a simple virtual button device handler? I have virtual switches and dimmers but I cant find a simple single-fire button.

This is really needed as part of Automation triggers (IF) or in the available devices list.

Any help would be great.


In the new app? Not possible

1 Like

Seriously?!?! Why not?

1 Like

There is no momentary button capability.
Instead, make a virtual switch and use smart lighting to reset it after 1 minute.


No no…stop thinking like a physical button.
Just a single throw DH that repeats ‘On’ when activated would work perfectly. Buttons are a crucial part of any iot ecosystem. So this must be possible. Without it, ST has lost some value.

You may need to create the handler yourself. Despite what you might hear, the Momentary capability works fine with the ‘new’ app to display a tile that fires the ‘push()’ command when pressed. So you could add a button or switch capability to that to give you an attribute you can work with.

The standard Momentary Button Tile handler might even do the job (that turns a switch attribute on and off) though you might need to run it in the Classic app first to initialise the switch state. The new app likes capability attributes to have values and the handler hasn’t been updated to initialise them.

I have my own custom DTH but haven’t really played with it enough to see if there are any deficiencies. However, if you are interested, it is this:

1 Like

I tried the momentary button tile. Works great in the old app, just a blank tile in the new app.

Thanks for writing this DTH, I’m giving it a try.

It’s close to what I need. Basically I’m looking to replicate the ability to execute my “goodbye” and “I’m back” routines manually. There doesn’t appear to be any other way to do this in the new app. I’m finding that your button doesn’t respond when I push it in the app… it just spins and goes to “Checking status…”

Annotation 2020-08-21 115622

See the community FAQ. (The topic title is a clickable link)

Basically, use a regular on/off virtual switch and then turn the switch off again each time after you’ve used it. I know it’s ugly, but it works.

1 Like

That’s rather annoying. I can’t replicate that behaviour but that doesn’t mean a lot. I’ve added a ‘vid’ to the device handler to see if being told what to do helps the app out. It has the useful side effect of enabling the momentary action in the dashboard tile.

Thanks. It looks like Option 8 is what I’m after. Seems like pretty obvious functionality to be missing from the new app, though…