šŸŽ® ZHA, deCONZ, Zigbee2MQTT - Ikea E1743 On/Off Switch & Dimmer Universal blueprint - all actions + double click events - control lights, media players and more with Hooks

This user has been inactive for some time, the blueprint below is still available, but please be advised it may no longer work.

Original Post

This blueprint is part of the Awesome HA Blueprints project.
Read more about it on the related Community Forum topic. :rocket:

Updates will be published on the projectā€™s GitHub repository.

:arrow_down: Get Started

Option 1: My Home Assistant

Click the badge to import this Blueprint (needs Home Assistant Core 2021.3 or higher)

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

Option 2: Direct Link

Copy this link if you want to import the blueprint in your installation.

:link: Blueprint URL

:page_facing_up: Description

IKEA E1743 TRƅDFRI On/Off Switch & Dimmer|200X200

This blueprint provides universal support for running any custom action when a button is pressed on the provided IKEA E1743 TRƅDFRI On/Off Switch & Dimmer. 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.

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

:electric_plug: Available Hooks

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

Light Hook docs

:loud_sound: Media Player

This Hook blueprint allows to build a controller-based automation to control a media player. Supports volume setting, play/pause and track selection.

Media Player Hook docs

:door: Cover

This Hook blueprint allows to build a controller-based automation to control a cover. Supports opening, closing and tilting the cover.

Cover Hook docs

:information_source: Changelog

Updated list of changes and improvements is available here.

Happy automating to everyone! :fire:

15 Likes

Thanks for this, looks good. Is it possible to add double click events similar to the 5 button remote?

1 Like

Hi @koconut,
youā€™re welcome, thank you for your feedback!

Sure, in the next days Iā€™ll apply the latest updates which were deployed for the 5-button remote blueprint, so that the double click feature will be available also for this controller.

Iā€™ll let you know as soon as the feature is implemented. :slight_smile:

1 Like

Hi there!

News for @koconut and anyone interested in the double clicks feature, Iā€™ve just pushed an update which adds the support for this functionality, plus a few optimizations inherited from the Ikea 5-button remote blueprint. 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.

My tests suggest that this controller, in contrast with the E1524/E1810 5-button remote, is able to handle clicks which are pretty close in time. If you have issues with triggering the double press actions, try to wait a few moments before pressing the button. If even after clicking the button a little slower youā€™re still getting the short press action triggered instead of the double press one, 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 you notice that 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:

2 Likes

Hi there!

Iā€™m happy to inform you that Iā€™ve just updated the Awesome HA Blueprints project with two new blueprint categories: Controllers and Hooks. :tada:

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

Happy automating to everyone! :fire:

Hey Matteo,

first of all thanks for creating these awesome blueprints. I have just tried to add the blueprint into my HA instance, but it did not work with the following error:

Invalid blueprint: Unknown selector type select found for dictionary value @ data['blueprint']['input']['integration']['selector']. Got OrderedDict([('select', OrderedDict([('options', ['Zigbee2MQTT', 'deCONZ', 'ZHA'])]))])

Could you please look into this or give me a pointer into what Iā€™m doing wrong?

Thanks
Lukas

Hi @lukkigi, thank you very much for your feedback!

This blueprint uses the new select selector, which was introduced in Home Assistant Core 2021.03.0.

Please update your Home Assistant instance, then try again. This should solve your issue. :smiley:

Itā€™s working perfectly now, thank you!

1 Like

Hi @lukkigi, Iā€™m happy to hear that, youā€™re welcome! :smiley:

Hey Matteo,

iā€™m trying to use ā€œlong pressā€ functionality with ā€œloop until releaseā€ flag activated.
Without loop itā€™s ok, just decrease the brightness with each long press correctly.
With loop itā€™s too fast so a long press of about 3 seconds is enough to turn off light (with a rapid sequence of decreases in brightness).

Is it possible to add a ā€œloop delayā€ in order to decrease the brightness every X second while still controlling the ā€œlong pressā€?

I tried to edit by myself but iā€™m not able to implement the ā€œdelayā€ part in this sequence (and the other one):

          - repeat:
              sequence: !input action_up_long
              until: '{{ not button_up_long_loop }}'

Also adding a new input to select the delay would be appreciated.

Thank you

Hi @napalmz, thank you for your feedback. :slight_smile:

In this Controller blueprint, delay control for custom actions is left to users: in the provided custom action sequence, users can add a delay action at the end, e.g.:

action_up_long:
- <your_sequence>
  ...
- delay:
    milliseconds: 250

Just a note, are you using the Light Hook, or implementing the feature with custom actions on this blueprint?

Thanks!

Hi Matteo,

thank you for your help, iā€™ve done this way and works great:

    action_up_long:
      - type: brightness_increase
        device_id: 7b95dc0138cd5f3d5a2d4bde38a21011
        entity_id: light.dimmable_light_5
        domain: light
      - delay:
          hours: 0
          minutes: 0
          seconds: 0
          milliseconds: 500

Hi @napalmz,

sorry for my late response, youā€™re welcome, Iā€™m happy to hear that everything runs great. :+1:

By the way, Iā€™d suggest you using the Light Hook for controlling your lights, since it already includes all the features for controlling light brightness and color:

The only thing currently missing, which for you might be relevant, is the ability to indicate the number of steps to control brightness from 0% to 100%, which would allow a finer and more precise brightness control for the connected light.

Iā€™ll add this useful functionality to the Light Hook in the next days. Iā€™ll let you know as soon as the feature gets implemented so you could give it a try if youā€™re interested in it. :+1:

Ok, iā€™ll give it a try!

Thank you

1 Like

Here i am again!
I have a problem when I activate ā€œExpose up button double press eventā€: the controller stops working.
In order to use the Light Hook with the function of restoring the brightness of the light after switching off, I wanted to put that the double pressure of the keys sets the light to maximum / minimum.
However, if the option ā€œdouble press eventā€ is activated, nothing works anymore.
I was wondering if I need to activate it or if I just map the double press on the controller without activating the option.

Thank you

Hi @napalmz, thank you for reporting.

if you want to expose a double press event, you should also provide a valid text input for the helper_last_controller_event input. This is used to store the last controller event and check if the same button has been pressed twice in a row.

You can find more info in the docs. :slight_smile:

Thank you,

i didnā€™t used that because it says ā€œ(ZHA, Zigbee2MQTT, double press action Required)ā€ and iā€™m using Deconz. Iā€™ll try!

Yeah, itā€™s required when using ZHA or Zigbee2MQTT or a double press action. :slight_smile:

Maybe thatā€™s a little confusing, we should find a way to better state that the helper is required with any integration, when using virtual double press events.

Please let me know if that solves your issue!

I have configured the text input and I see it changing value when I press the button, so that is ok.

However, if I press the button twice, with a delay of 1000ms, I get the result as if it were a single press.
Increasing to 2500ms is the same, it performs single action after 2.5s.
In the Light Hook I read that the double pressure corresponds to the change of color so it is not explained why instead it turns the light on / off.
Maybe I have to set the action in the controller instead? Or would I conflict with the hook again?

Thank you

Hi @napalmz,

Please try to wait a few moments before pressing the button for the second time, since the controller does not fire the second press event when clicks are too close to each other. If even after clicking the button a little slower youā€™re still getting the short press action triggered instead of the double press one, increase the value for the Helper - Double Press delay input.

Thank you!