Check out this blueprint to simulate the IKEA TRADFRI Remote (5 button version) through ZHA events with your own custom actions.
Button
Action
Power(short)
User defined action
Dim-Up(short)
User defined action
Dim-Down(short)
User defined action
Right(short)
User defined action
Left(short)
User defined action
Power(long)
User defined action
Dim-Up(long)
User defined action
Dim-Down(long)
User defined action
Right(long)
User defined action
Left(long)
User defined action
Get started
Click the badge to import this Blueprint: (needs Home Assistant Core 2021.3 or higher)
Or import this Blueprint by using the Gist URL: https://github.com/niro1987/homeassistant-config/blob/master/blueprints/automation/niro1987/zha_ikea_tradfri_5button_remote_custom.yaml
Great Blueprint, very useful.
Is there a way to have a smoother dimmering of lights, maybe keeping the button pressed instead of press it several times until the desired power?
Thanks a lot!
Thanks for your reply.
I saw the other Blueprints, anyhow the Custom Action one allows a lot of more freedom on controls, including controlling different lights with Dimmer and arrow buttons.
Is it possible to have a smooth transition on dimmering in this blueprint as well?
Thanks a lot, again great job.
While this is possible, it wouldn’t make much sense to create a blueprint for such a specific purpose. You could dig into the YAML of this automation and modify the sequence on each button as you want it to be.
@Brunelma Reading back on this - Yes, there is a way to get smooth transition in this blueprint but because everything is basically a single action, you’ll need to use the choose-hack.
Basically, you add a Choose action and remove the condition that was added by default. Now, in the default section, you add an action that increases the brightness with a short transition time (say 1 second), followed by a delay action for that same transition time.
Thanks! I though the middle (“power”) button would only allow short presses. And indeed, if I associate an action to the “Power (long)” button, nothing happens. Am I missing something?
You can listen for zha_event in Developer Tools > Events. The Long-Press on the Power Button is triggered by a move_to_level_with_on_off command. If you see that passing by, it’s not the blueprint
Also, you can track the execution of the automation from the automations page.
OK, thanks (I’m new to HA, I was not implying it’s your blueprint’s fault! )
I looked into the history of that automation (I hadn’t “discovered” that section yet, thanks for the tip!), and for the long press (move_to_level_with_on_off) it reports “This node was not executed and so no further trace information is available.”.
If I do a long press, a short press (toggle) is reported in the history instead…
How long is long? Keep it pressed 5 seconds. It should report a short-press, followed by a long-press and finally a release (if you do ever let go that is).
I see, maybe I was not pressing it long enough. All events are captured… but as you say/expected, it reports a short press first, then the long press and finally the release… which means (?) that the short press user defined action will always be run before long-press user defined action…?
I use and love this blueprint, so thank you for it ! I can finally map all of the 5 buttons.
Too bad you are forced to execute the short press action in every situation before the long press action though. I used to work with the frenck blueprint for this remote, and i miss its ability to execute only the long press actions though.
EDIT : This short/long press issue only happens with the main ON/OFF button. Totally works for the other buttons. Thank you !!
I understand the problem with the short-press action. I do not see how this could be improved as the remote itself sends a short-press action when you hold it down. It is only after a few seconds that the remote sends the “ooh wait, I am still being pressed” action.
One solution would be to wait for this second command and only execute the short press if it does not come, but that would make for a very laggy experience on the short-press.
I´m connecting to my Ikea remote through the Ikea hub. Is this blueprint still applicable for that situation or is this only for ppl who are using a ZHA dongle?