Unfortunately this is not possible due to how the controller is designed: when holding down the center button, first a short press event is fired, then the long press is fired. This does not depend on which integration is used to connect it to HA.
By the way we could implement some virtual events for the buttons (eg. double click events) so that we can extend the controller functionality even more.
Hey @epmatt thanks so much for taking the time to reply and for all the help!
The example worked perfectly
That would be a great feature if we could do things like that, unless you can think of another way of doing it as it is currently?
I like to use the remotes as theyāre intended for the most part, on/off, brightness and colour temp. But it would be cool if double click was a possibility and opened up a whole other level of customization!
Weāre currently limited to the events the remote provides, so to perform actions we can only hook to the single, hold and release events the remote fires when the buttons are pressed.
But thatās a really good point, adding this feature would allow better customization, with 5 more actions which can be run (1 per remote button).
Iāll definitely take a look at this, and try to find a solution which does not affect users who have already imported the blueprint (that is, without altering the current blueprint inputs).
If you have suggestions on how to implement this feature, Iād be happy to hear back from you.
News for @maxwood and anyone interested in the double clicks feature, Iāve just pushed an update which adds the support for this functionality, plus an optimization which significantly reduces automation runs, which where triggered under the hood for empty and repeated button events. Docs have been updated too to reflect the additional blueprint inputs.
Please notice that weāre really pushing the limits of this controller here, by implementing virtual double press events. Under the hood, the blueprint relies on the previous button press and a delay.
This means that if you provide an action for a double click event, when a button is pressed the automation will first wait for the second short press event, then, if none is received within the provided delay, the action for the single short press will be executed. This will result in a slight delay between the short press and the action execution.
Moreover, my tests suggest that the controller doesnāt fire the two button press events if the clicks are too close in time. This behaviour happens for all buttons, but itās more noticeable for the left and right ones. To make sure the double press event is triggered properly, please wait a few moments before clicking the button for the second time. If you still have issues try to increase the value for the Helper - Double Press delay input.
Iād also like to point out that this is not a breaking change: anyone who is currently using the blueprint can safely update it without having to reconfigure the related automations. No performance reductions to existing automations will be caused by these new features.
If you have any suggestions or something is not working as it should with this update, please reach out here, Iād be glad to help.
Thank you for adding the double click option. This will be very useful.
I do have 1 question for you. Iām also using the TRADFRI on/off switch in the bedroom and I like to add a double click event to that remote as well. Is there a simple way I can tweek your blueprint so it can be used for this switch as well? Or can you maybe take look for me, since you are much more experienced in this stuff.
It currently supports only native events (click, hold and release for both the on and off buttons) but in the next days Iāll apply the latest updates to that blueprint, so that the double click feature will be available also for the on/off switch remote.
Iāll let you know as soon as the feature is implemented.
Iām happy to inform you that Iāve updated the blueprint for the TRADFRI on/off switch. The update adds support for double click events, plus implements optimizations which were originally applied to this blueprint.
If you have any suggestions or you want to leave a feedback about the on/off switch blueprint, we can continue the discussion there.
Iām trying to use the example RGB Light control with brightness and color setting and I would like to have the light to be warm white and with a % of brightness when I do a single click on center button.
Tu turn the lamp off I would like to use only double click on center button.
for testing purposes, please try to increase the value of the Helper - Double Press delay input to 10000. This will make the automation wait for 10 seconds for the second press. Then try to slowly click the button twice and see if the double press action is executed.
If this test fails we can exclude a short delay as one of the causes, hence we can try to investigate a different solution.
Hi everyone, Iād like to inform you that @woody4165 and I are still trying to debug and find the causes of this issue, which by the way it seems not to impact all automations generated with this blueprint.
Iāll definitely keep you posted here on further developments.
Iām happy to inform you that Iāve just updated the Awesome HA Blueprints project with two new blueprint categories: Controllers and Hooks.
Controllers are blueprints which allow to easily integrate a wide range of controllers (wall switches, remotes, dimmers, etc.) and use them to run a set of actions when interacting with them. They consist of a practical abstraction layer for easily building controlled-based automations without worrying about the handling of raw controller events, and the integration used to connect controllers to Home Assistant (Zigbee2MQTT, ZHA, deCONZ, ZWave, proprietary hubs, etc.).
Most importantly, beside providing action sequences to Controller blueprints to build a custom controller-based automation, you can connect Controllers with Hooks .
Hooks are blueprints which seamlessly integrate with Controllers to enable control of lights, media players and much more, without you ever writing a single line of code.
For further details please read this annoucement post on the Awesome HA Blueprints project thread.
To reflect these changes, this blueprint has now been moved to the Controllers category. The original post on this thread has been updated with new links to docs and blueprint code. Examples have been removed since the functionality can now be implemented with the Light Hook.
That worked. It wasnāt really clear how to setup up left and right button press in the Button blueprint at first, but it works by not filling in anything
Thanks!
if I can provide feedback regarding docs. It will be really helpful if you also add one example of using Controller - Hook blueprint.
I was straggling with it for a few hours. What has to be first, then I fill all optional actions in Controller automation and also put Hook and it was hard to find whats wrong. It will be really useful if you put one use case, for example Ikea-5 button remote with light hook and attach pictures of correct automation setup. Of course everyone will have different entities but we will see what we have to fill and what we have to leave empty. Like template.
Also it was unclear for me that I have to create some input_text entity. First I thought that I have to provide some existing one from Zigbee2Mqtt and I was google-ing why I dont have that for my setup. Then I realized that actually I have to create one.
Hi @deadly667, thank you so much for your feedback.
It will be really useful if you put one use case, for example Ikea-5 button remote with light hook and attach pictures of correct automation setup.
Thatās definitely something Iām gonna add to the documentation. The way these blueprints work is not so straightforward, and given their flexibility and modularity, they require that small procedure when setting them up. Docs should state it clearly, and examples could probably be one of the most helpful resource in this sense.
Also it was unclear for me that I have to create some input_text entity. First I thought that I have to provide some existing one from Zigbee2Mqtt and I was google-ing why I dont have that for my setup. Then I realized that actually I have to create one.
Youāre right, different users reported the same misunderstanding in the past weeks, and thatās something I should address in the docs.
Something which I think itās not currently clear enough is also that you can use multiple Hooks with the same Controller automation, as well as provide custom actions for the Controller blueprint at the same time.
Thanks again for your suggestions, really appreciate it!