Check if action happen in under 0.5 secs

Hi all

I have a light switch with a momentary button.

I want to set a trigger event so if the button is pushed twice in under 0.5 seconds then it runs actions
Can someone pls help with how to set the trigger?.

Thanks

What kind of device is it? Manufacturer/model?

Assuming your switch doesn't have double-tap natively, I know it can be done thru the use of a Boolean or a virtual temporary switch that turns auto-off after 0.5 seconds. I just can't get the logic straight. It's been done in at least one other thread. I just need to find it. Stay tuned.

1 Like

See if the logic helps:

1 Like

The light switch is controlled by a Shelly 1. So unfortunately it doesn’t have a ‘double tap’ option which is why I need to manually check for it

Thanks. I’ll give this a go after work

If using HE to handle the double-tap doesn’t end up working out for you, and if you’re willing to flash the Shelly, you could install tasmota on the Shelly 1 and use that to enable double (and even up to five-tap) that way. It will take a little effort to set up, but it does work very reliably.

1 Like

Theoretically this is not a problem.
Practically you can do this in custom app (but you have to write it yourself).
Unfortunately in RM timing is not guaranteed, specifically in sub-second range.

1 Like

That’s my concern as well - especially with a wireless device. IMHO, best to handle this sort of timing on the device itself.

100% agree. This was a reason why I created ESP32-based custom Door Actuator Controller.

2 Likes