This blueprint provides universal support for running any custom action when a button is pressed on the provided IKEA E2001/E2002 STYRBAR Remote control. Supports controllers integrated with deCONZ, ZHA, Zigbee2MQTT. Just specify the integration used to connect the remote to Home Assistant when setting up the automation, and the blueprint will take care of all the rest.
In addition of being able to provide custom actions for every kind of button press supported by the remote, the blueprint allows to loop the long press actions while the corresponding button is being held. Once released, the loop stops. This is useful when holding down a button should result in a continuous action (such as lowering the volume of a media player, or controlling a light brightness).
The blueprint also adds support for virtual double button press events, which are not exposed by the controller itself.
Automations created with this blueprint can be connected with one or more Hooks supported by this controller.
Hooks allow to easily create controller-based automations for interacting with media players, lights, covers and more. See the list of Hooks available for this controller for additional details.
Full Documentation
Full documentation regarding requirements, inputs and more is available here.
Docs provide all the information you need to properly configure this blueprint on your instance.
Available Hooks
Light
This Hook blueprint allows to build a controller-based automation to control a light. Supports brightness and color control both for white temperature and rgb lights.
Hello. This blueprint looks exactly what Iād like to use. However Iām having some issues and Iām not sure if they are related to my deCONZ configuration or if Iām doing something wrong with the blueprints. So Iām trying to use controllers and hooks, but my E2001 controller is not connecting to my light hook. Here is my light hook configuration and controller configurations
So I only have the sensor.olohuone_kytkin_battery level entity for my button but Iām not sure if I should have something else? And because I want to use the default actions for the light hook I didnāt configure eany actions myself in the controller configuration. Are these right? And any ideas about what is the problem? My controller automation does trigger so that shouldnāt be the problem.
Thank you in advance
Edit: It seems I wrongly assumed that the light hook needs to have the Zigbee gateway as the device. When I switched the controller device to the controller device everything works. Thank you for the blueprint, amazing work!
thank you for reporting here. Iām glad that youāve managed to solve your issue.
So I only have the sensor.olohuone_kytkin_battery level entity for my button but Iām not sure if I should have something else?
You can safely remove the value you provided as the āController Entityā input in the Light Hook configuration: since youāre using deCONZ, this integration exposes the controller as a device to Home Assistant. Therefore, you should only provide a value for the āController Deviceā input, matching the device exposed by deCONZ for your controller.
Aside from this, configuration for both the controller and hook automations look great to me.
If youāve any additional questions or doubts feel free to ask, Iād be glad to help. Happy automating!
I was using it without any issue whilst using deconz to manage by zigbee network.
However yesterday I moved to ZHA and it seems that the blueprint has an issue picking double clicks.
As soon as I enable āexpose double press eventā, the blueprint will trigger the double click action whether I clicked single or double. Long clicks work OK.
EDIT: I resolved the issue
For some reason every single click was generating 4 click event (like if the device was paired multiple times).
Full reset + repaying resolved the issue (now only one event is fired and your blueprint functions like a charm)
thank you so much for your feedback. Iām glad that your issue is solved.
Iāll add a small note on the blueprint documentation, stating that the controller might have this strange behavior with ZHA, and a full reset should solve the problem.
Yeah I canāt really get more than one fuction from the side buttons with this template.
Either I have single click on but the holding makes the top button trigger, or I have the double click enabled and the single click stops working, or, or, or. Tried a bunch of things but it basically all comes around to the same.
I downloaded the Hook - Light blueprint from Awesome HA Blueprints but Iām confused why Iād need this separate blueprint for the light colour control
Edit 2:
I have to use 2 separate automations to get the desired functionality:
Up button short press ā Turn on
Up button long press ā Brightness up (continuous, until release)
Down button short press ā Turn off
Down button long press ā Brightness down (continuous, until release)
Left button short press ā Color down
Left button long press ā Color down (continuous, until release)
Right button short press ā Color up
Right button long press ā Color up (continuous, until release)
I cannot control light colour with the Controller - IKEA E2001/E2002 STYRBAR Remote control blueprint
I can control light colour if I use the Hook - Light blueprint
I need 1 automation for each set of control (1 x light control, 1 x colour control = 2 automations)
I cannot use the colour control automation if I disable the light control automation (both need to be enabled)
This means that if I had 5 of these IKEA buttons, Iād need 10 automations 1 each for normal light control and 1 each for colour light control. That would be really cumbersome.
Disclaimer: this is the first blueprint I am using (exception made for the blueprints coming with HA) and I am also quite a newbe in domoticsā¦
Thanks for this blueprint.
I tried to use it with zigbee2mqtt but I have some issues with the hold functionality (for the brightness buttons).
In particular, when I hold the increase or decrease brightness button, the brightness of the associated lamp change only one or at least two times. I have to release and hold again to make other 1 or 2 steps and so onā¦
Looking at the events in HA, it looks like that the events are triggered many times in a very fast sequence: maybe the lamp cannot follow that pace or nearly each āincrease brightness commandā is interrupted by the next trigger before having the time to take effect.
I tried with a limited number of repetitions (20) or with a bigger one (200). In the second case I have the same one or two brightness changes but then the light freezes becoming unable to receive any other command (like turning it off); however I can still use the remote to control (turn on or off) another linked lamp pressing other buttons.
Would adding some delay between cycles improve the behaviour ?
Have I understood correctly the process of this specific piece of the automation? Here follow what I understood.
By default, the hold/long button press is triggered only once so normally the brightness of the lamp is changed only of one step, no matter how long the button is pressed. To āsimulateā a continuos action associated with the hold/long press, the action is repeated in a cycle. The cycle is interrupted when the āreleaseā command is received triggering another action and so interrupting the repeated action (brightness inrease/decrease in the specific example). This is made possible by the ārestartā mode; otherwise the already started cycle would run up to its normal number of iterationsā¦thatās also why we have to enter a max number of iteration as a safety net). Am I right ? Not sure of having well undestood the effect of the possible modesā¦
Just so you know, itās not an issue with this template.
When long-pressing right/left, the remote itself sends payload āonā before sending arrow_right_hold. That āonā payload is exactly the same as when pressing up, so no way to differentiate it.
Hi,
I have a problem with this blueprint using ZHA integration.
"Error: UndefinedError: ādict objectā has no attribute āeventā "
How can I solve?
For some reason my STYRBAR remote control doesnāt completely work with this specific Controller and the Light Hook, I canāt dim up and down the light intensity. On/off and color change works ok.
Basically the configurations are as default as they can be. I looked at the code of both blueprints, compared with other blueprints for the same remote to make sense of if but I didnāt found the problem. Iām still new with automation and blueprints.
Does anyone as a clue about what can be the problem? Am I doing something wrong?
Thank you,
Luis Sismeiro
Note: I didnāt gave up yet and made some tests with the controller to turn on and off simple devices like a switch and I can use the hold on the left and right buttons do turn on (left) and off (right) and it works. I canāt do the same by holding on up and down buttons which for sure justifies my the problem reported.
Iām replying to myself to share the latest regarding the troubleshooting and fixing of the problem I reported, it may be useful in the meantime to someone and included in the official release.
I had to change in the blueprint code the strings to match what zha_event sends to the for the Up Button Hold and Down Button Hold:
Change this and the hold for Up and Down buttons will start to work as expected. I will try to do a merge request change or something like that if I find the way to do it.
Regards,
Luis Sismeiro
Note: Solved one problem found another one or two. After releasing the hold it didnāt stop, had to add a new fix to the blueprint:
There is also the same issue for the Left and Right release after the hold because the string sent by the zha_event has a ārandomā positive number for the Left and a ārandomā negative number for the Right. If you have any idea on how to fix if, itās welcome.
Note 2: The release problem for Left and Right is kinda solved, it only works for this controlller when using ZHA. To work with the deCONZ and Z2M, the fix must be removed. Some condition must be included somewhere but I donāt have the knowledge for that (yet). If you know how, please tell me. The fix is getting the substring release from the zha_event:
- conditions:
- '{{ trigger_action[:7] | string in button_left_release }}' -> on line 518
- conditions:
- '{{ trigger_action[:7] | string in button_right_release }}' -> on line 582
Same here.
Just does not work, no event is recorded on the helper and same error message.
Executed: July 19, 2022 at 7:54:25 PM
Error: UndefinedError: 'dict object' has no attribute 'event'
Define variables trigger_action, trigger_delta, last_controller_event
Stopped because an error was encountered at July 19, 2022 at 7:54:25 PM (runtime: 0.03 seconds)
UndefinedError: 'dict object' has no attribute 'event'