Button tap simulates duratuon

Hello. Is there a way to program a button so when I press it, it is the equivalent of holding it down for a certain amount of time. I currently have buttons to turn the volume up and down on my amplifier if I tap the button several times it takes forever for the volume to turn up. However, with the Harmony remote, if I simply hold the button down, it goes up extremely fast.

Hoping for an answer on this thank you

No, the web controls do not support this. Even if you automate a loop when the hold action occurs there is no way to know when the button is released to stop it (no button release event).

You could automate a large step on the button hold action.

Hi thanks for the reply. What do you mean by the last sentence? Automating a large step?

Also I don’t want to hold the button. I want to tap it once and have it be the equivalent of me holding the harmony remote for 2 seconds.

Set the tap action to be a script.

In the script loop sending the remote code for 2 seconds (with a short delay between each one).

https://www.home-assistant.io/docs/scripts#repeat-a-group-of-actions

Ah ok.

So I’ve done this
num_repeats: 10
delay_secs: 0.1

And it is faster than if I manually keep tapping the button, but it still isn’t super fast like holding the Harmony button down. I feel like that’s doing something different with the harmony hub in a matter of three seconds you can turn the volume of the amo all the way up that way.

So I imagine with a 0.1 delay that’s the best I’m gonna do with HA.