Is it possible to trigger a rule by a long-press or double-click?

If I have a pretty much standard, supported switch, can I create a rule that will be triggered either by a long-press, let’s say longer than 2 seconds or a double-click, when I very quickly push the switch button twice?
If that is not possible via rules, what would be the best approach?

What’s the brand and model number of the switch?

There are a number of switches now available which work with the smartthings platform which incorporate detection of double press or other tap patterns. These can work well with smartthings as long as you’re comfortable with the fact that when you only make a single press there will be a slight delay because the switch is waiting to see if you are going to press again. This bothers some people, but not others.

For example, both the zooz and inovelli switches sold in the US have multi tap capability on some models.

However, if your switch only supports single tap as designed by the manufacturer, it really is not possible to add a double tap capability to it. Some people have tried over the years, but the problem is that the latency introduced into the system almost always means that you will miss some double taps. So it’s really just best to choose a switch which has this capability built into it by the manufacturer. then the timing and tap detection is done by the switch itself, and there are no latency issues. :sunglasses:

Long hold always requires that the manufacturer has built it into the switch itself, because you need a timer from the switch to make that work.

I got it. Depends on the “hardware”. I cannot find that particular model now but it is eWeLink compatible switch.

1 Like

There are dozens of different devices compatible with ewelink from several different manufacturers, so as always, the first rule of home automation applies: “the model number matters.” For example, some of the Sonoff devices which work with eWeLink support double tap, but not all of them.