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?
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.
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']