šŸ” Multi Click Button - Make any button multi-clickable

Get it now:
Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

Introduction:

Allows multi-click actions to take place on a button.
Upon reaching the number of required clicks, it executes user defined actions.

  • Double click a button to turn on a light?
  • Quintuple click a button to turn off the alarm?
  • Centuple (Yes, 100 times!) flick a switch to reveal a hidden closet?
  • ā€¦

This and much more is possible with this Blueprint.

How it works:

  1. Select your button.
    (There are 3 entity types supported: button, input_button and switch)
  2. Set home many ā€˜clicksā€™ your button needs to make before the actions are executed.
    (Every state change is counted as a click. Therefore, in switch entity types, both turning it on or off is counted as a ā€˜clickā€™.)
  3. Set how much time there can be between clicks.
  4. Set actions to execute
  5. (OPTIONAL) Add conditions that need to be met before executing the actions.

Most recent version:

1.2:

Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.
:link: Source code (Github)
:gear: See code changes (Github)


:memo:Changelog:

06/09/2024 - Version 1.2

  • Updated the time between click selector to the new duration selector with millisecond support. (Requires Home Assistant 2024.8 and newer).
See older changes

09/01/2024 - Version 1.1

  • Removed an unneeded logger action that was used in development

09/01/2024 - Version 1.0

  • Original release
6 Likes

NEW RELEASE:

09/01/2024 - Version 1.1

  • Removed an unneeded logger action that was used in development

Hi, Iā€™m new to this forum and also to using blueprints. I really like the idea of running multiple actions with just one button, thanks for the work you are sharing here!

The problem I have is that if I have, for example, one automation for 2 clicks and another for 3 clicks, if I want the one for 3 clicks to run, it always runs the first automation with 2 clicks first. Is that correct? And is there a way to ensure that only the correct automation is executed?
Thanks! Mario

1 Like

Hi,

Thatā€™s correct. The blueprint doesnā€™t know how many automations itā€™s used in.
This means that if you use the same button for a double click and a triple click and you click the button 3 times, then both triggers will be fulfilled and both automations will run.

Ok, I got it. Maybe I would have to select the 3x automatic with a larger timeout so that the 2x expires. If I want the 3x action, I would have to press slowly.

The 2 click automation (2CA) would need to expire twice actually.

Letā€™s say you set the double click timer to 1 second between clicks and the triple click to 2 seconds between clicks:
You click once and wait for more than 1 second to let 2CA expire, then you click a second time, after which you will need to let the 2CA expire again before clicking the 3rd time.

So itā€™s possible, but a little convoluted.

Perfect, trank you for the feedback and support.

1 Like

Is there any reason you didnā€™t include ā€œlightā€ entities as well? I have a couple dimming switches that arenā€™t just binary. They do have on/off state, though, so there shouldnā€™t be an issue here, as far as I know.

1 Like

Iā€™d like this too. I have now manually created something similar but would love to use a blueprint for this. Iā€™m using a Shelly dimmer in the light domain.

The trigger Iā€™m using:

  - platform: device
    device_id: da83ac5220cbff4807e1f1d2ee04cd9f
    domain: shelly
    type: single
    subtype: button1
    id: shellyclickevent

The way it currently works is that every state change will count as a ā€˜clickā€™. So I think you might have issues where every time the dimming value is changed it will count that as a ā€˜clickā€™ too.

Can you add Long Press too?

The problem with adding a long press function is that you need to know when the press started and stopped. Thatā€™s not possible with most switches unfortunately.

1 Like

NEW RELEASE:

06/09/2024 - Version 1.2

  • Updated the time between click selector to the new duration selector with millisecond support. (Requires Home Assistant 2024.8 and newer).

Hello,
i am looking for the solution which will save me some space in the dashboard.
Basically I need 1 click to the ā€œblinders upā€ to run script to move blinders about 20Ā°, and double click would open on close them totally. But whatever i do doubleclick action is always trigger also single click automation. Which overide that function.

I dont understand previous comment how to solve this. Or isnĀ“t it somehow upgradable to add this logic ?