Detecting Multiple button press on device

Hi all,

I hope all is well, and preparations for Christmas are going well!

I couldn’t find an answer to my question, so I hope it’s not been asked before!

Is it easily possible to detect if a power button has been pressed, say 3 times within 30 seconds?

Thanks for all help!

You could emulate it a bit by using waits in your automation to try to detect it, but it’s better if the device itself supports it so it sends a different command back to HA. For instance, my Inovelli switches support multiple button presses and then I can read the information sent to HA to know how to deal with it.

The idea would be to receive the first press and act on it then “wait” and if you get another one within 30 seconds you do the next action or even wait again for the third instance. It would be a bit squishy because you never know if the switch platform is sending it in a timely manner (i.e., Z-Wave congestion or the device is just laggy in sending back to HA). Certainly possible.