🎮 ZHA, deCONZ, Zigbee2MQTT - Ikea 5-button Remote Universal blueprint - all actions + double click events - control lights, media players and more with Hooks

Hi @B1n00,
you’re welcome, thank you for your feedback!
I was answering you, but I’m happy to hear that everything works now. :rocket:

1 Like

I am looking for some way to switch colors using the right or left arrow but I cannot find do you have an idea to how I could performed this?

Thank you again

Hi, which kind of device are you trying to integrate? Is it an RGB light?

Yes some RGB Lights. Ideally I would like to change color using right arrow and step back to the previous using the left arrow.

This is how I currently change color on an RGB light bulb with the IKEA remote:

      - service: light.turn_on
            - >-
              {{ (
              'hs_color')[0] or 0) - 15)) % 360 }}
            - 100
        entity_id: light.my_light
      - service: light.turn_on
            - >-
              {{ (
              'hs_color')[0] or 0) + 15)) % 360 }}
            - 100
        entity_id: light.my_light

It sets the saturation value to 100% and cycles through the 360 degrees of hue in 24 steps (of 15 degrees).


I have IKEA LED1624G9 bulb (https://www.zigbee2mqtt.io/devices/LED1624G9.html) I need to change x and y values for color change, instead of this code:

color_temp: ‘{{ [state_attr(“light.0x842e14fffe997340”,“color_temp”)|int - 50, 1]|max }}’
transition: 0.25

works with my IKEA RGB light, thanks!

1 Like

It works perfect !
Thank you

@Tomas_Kibirkstis @B1n00 sorry for my late response, happy to hear that everything works great!
Thank you for your feedback :tada:

Thank you so much @kks36 for the code snippet, which cleverly gets the job done!

I’ll definitely add an example which includes your piece of code and implements full control of a RGB light (toggle, brightness and color change).

Thanks again! :rocket:

1 Like

@epmatt. I love this blueprint! It really cleans up my automation list (1 per remote instead of 9)

1 Like

Thank you for your feedback @Jeroenvans!
Happy to hear that this blueprint is useful to you. :tada:

Thanks for the blueprint, I’m still tinkering and learning so some of this could be errors with what I’m doing.

Would it be possible to get double press on center button? What I want to do is toggle the main light as normal with the center button but if I double press it toggles the lamp.

I tried assigning just the lamp to the long press but it still toggles the main light.

I’m using the ZHA integration if that makes any difference.

I see that someone has shared some code for IKEA colour bulbs, but does anyone have any advice how to adapt that to work with the IKEA white spectrum bulbs?

Hi @maxwood, thank you for your feedback.

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. :+1:

The example provided here in the docs should work for white spectrum lights:
If that’s what you’re looking for, please let me know if everything runs as expected. :slight_smile:

1 Like

Hey @epmatt thanks so much for taking the time to reply and for all the help!

The example worked perfectly :slight_smile:

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!

You’re welcome @maxwood! Happy to hear that! :tada:

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.

Thank you so much for the idea! :slight_smile:

1 Like

Hi there!

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. :tada:

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. :slight_smile:

Happy automating! :fire:

Hello @epmatt,

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.

I hope you will be able to help me with this.

Hi @jimmydwn, thank you very much for your feedback.

I’ve recently developed a blueprint specifically for the TRADFRI on/off switch. You can find it here:

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. :slight_smile:

1 Like

Hi @jimmydwn,

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. :tada:

If you have any suggestions or you want to leave a feedback about the on/off switch blueprint, we can continue the discussion there. :slight_smile:

1 Like