SmartThings Button help

In SmartThings, the smartthings button supports pressed, double pressed and held but in sharptools rules I only have trigger action for pushed and held.

Is there a way to use double press?

@Terri, the ST button’s default driver doesn’t include the “double” in button’s supported attribute value. You can grab SmartThings’ device driver for the SmartThings SmartSense button from the link below, rename the device handler and add one line attribute "button", "string" as shown in the screenshot, and change the device’s type to this updated device handler.

Edit the device in SmartThings IDE site to change the type to this updated device handler.

Then, reauthorize this device to SharpTools in the user page again. Now when using the button as the trigger, you can just type double, pushed, or held as you need.

Let me know if you have any questions.

Thanks but I’m confused. I am using the standard SmartSense DTH and these are the supported button vales from the device page

Is this not showing that double is supported?

Also, custom DTH is not going to be an option much longer (when the IDE shuts down) so that’s not going to work.

Unfortunately, some of this is a side-effect of SmartThings being stuck between two worlds of the ‘new’ platform and the ‘Groovy’ platform.

The supportedButtonValues is a separately defined attribute but it’s not used consistently since the mobile app and SmartThings automation builder use a separate device definition of the button attribute altogether. :man_facepalming:

That being said, in the Groovy device handlers, the device can define which values it supports for specific attribute which is what the SharpTools Rule Engine uses for determing which values to display. The default for the button attribute is ‘held’ and ‘pushed’ (reference). In the example provided by James above, the snippet redefines the button input as a string just to allow any value for more flexibility, but a device would normally define the specific list of values that it supports (ENUM).

capability "Button"
capability "Sensor"

attribute "button", "enum", ['pushed', 'held', 'double']