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

From: Controller - IKEA E1743 TRƅDFRI On/Off Switch & Dimmer | Awesome HA Blueprints

Input Text Integration

ZHA, Zigbee2MQTT, Double press action Required

ā€¦Itā€™s required when using ZHA to integrate the remote, as well as when using double press eventsā€¦

I made the same mistake, also using deCONZ

Yeah I saw that documentation part, but read it as if I was using either ZHA, Z2MQTT or wanted to use Double press actions, which i didnā€™t use any of. Seems that it could be improved in the docs a bit :slight_smile:

Hi @Da9L @Nick4,

Iā€™m glad to hear that you managed to configure this blueprint. :slight_smile:
With the feedback from you and other users here in the forum I recently fixed and improved docs for both controllers and hooks. Some of those info were outdated and referred to a previous blueprint version, so they needed to be updated.
Anyway, with the updated docs it should now be clearer which inputs are required, their role and how to set them up. :wink:

Thank you!

2 Likes

Well let me THANK YOU for an impressive blueprintā€¦ its working so well now and Iā€™m very pleased with it!

1 Like

Thank you so much @Da9L, Iā€™m really glad to hear that you find my work useful.
Happy automating, and enjoy the blueprints! :wink:

iā€™m just getting started with HA and really struggling to get this to work. when running the blueprint automation i keep getting an error UndefinedError: ā€˜dict objectā€™ has no attribute ā€˜eventā€™

iā€™ve been all over the config files, instructions, and interwebs and just canā€™t figure out whatā€™s missing here. any ideas?

Hi, have you created ā€œHelper - Last Controller Eventā€, itā€™s required.
Check the additional notes of the button bleuprint.
In the configuration menu of HA there is a ā€˜Helpersā€™ section.
More info on: Controllers-Hooks Ecosystem | Awesome HA Blueprints

yeah i did that

@epmatt what a nice blueprint! Love it - especially the volume increase with long press!
But, when i Play/Pause my Sonos speaker with a SINGLE push, it also increases the volume but 1 unit - how come?

Hi @racerx,

thank you for reporting here. Iā€™m sorry for the delay.
Could you please provide the full YAML for the automation youā€™re trying to configure with this blueprint?

Thanks!

Hi @Thomas_Munster,

Thank you for your nice feedback! Iā€™m glad that my work has proven useful to you! :smiley:

But, when i Play/Pause my Sonos speaker with a SINGLE push, it also increases the volume but 1 unit - how come?

This behaviour is not expected. Could you please provide the full YAML for the automation you configured with this blueprint? Moreover, are you also using the Media Player hook for the same device?

Thank you!

Hi @U.R.A.M.Q.T.T,

Iā€™m happy to inform you that I recently developed a controller blueprint for the IKEA E1766 remote.
Hereā€™s the related topic here on the HA Forum:

I hope youā€™ll find it useful. Happy automating! :fire:

Hi @epmatt

I somehow worked around it when I disabled ā€œlong pressā€ as volume up/down.
I can still somehow turn volume up/down by ā€œlong pressā€ but now it sometimes lags/hangs, resulting in the volume being turned up all crazy to 100%!

Here is the controller:

alias: Sonos Controller
description: ''
use_blueprint:
  path: EPMatt/ikea_e1743.yaml
  input:
    integration: ZHA
    controller_device: 42775e71e1c62114c7786b18ab2a7a3f
    helper_last_controller_event: input_text.knap_sonos
    action_button_up_short:
      - service: media_player.media_play_pause
        target:
          device_id: 6f689b279d24c4d6408d3c7649ba98f5
    action_button_down_short:
      - service: media_player.media_next_track
        target:
          device_id: 6f689b279d24c4d6408d3c7649ba98f5
    helper_debounce_delay: 100
    button_up_long_max_loop_repeats: 5
    button_down_long_max_loop_repeats: 5

Here is the hook:

alias: Hook - Media Player
description: ''
use_blueprint:
  path: EPMatt/media_player.yaml
  input:
    controller_device: 42775e71e1c62114c7786b18ab2a7a3f
    controller_model: IKEA E1743 On/Off Switch & Dimmer
    media_player: media_player.sonos_alrum
    volume_steps_short: 20
    volume_steps_long: 20
    controller_entity: sensor.knap_sonos

Hi @epmatt

Thanks for making this blue print. itā€™s exactly what I need for these E1743 buttons that I have. I created a automation using this blue print. I used all the clicking triggers and all of them work, but I donā€™t know why double press triggers both short press and double press actions. I set double press delay from 500ms to 2000ms and it still triggers 2 actions. Here is the code and trace timeline:

alias: Switch 2
description: ''
use_blueprint:
  path: EPMatt/ikea_e1743.yaml
  input:
    integration: ZHA
    action_button_up_double:
      - service: media_player.turn_on
        target:
          device_id: 15f26b5b264d15150e2a149e689ed6bd
      - service: media_player.media_next_track
        target:
          device_id: 15f26b5b264d15150e2a149e689ed6bd
    action_button_down_double:
      - service: media_player.media_play_pause
        target:
          device_id: 15f26b5b264d15150e2a149e689ed6bd
    button_up_double_press: true
    button_down_double_press: true
    helper_double_press_delay: 2000
    button_up_long_loop: true
    button_down_long_loop: true
    button_up_long_max_loop_repeats: 5
    button_down_long_max_loop_repeats: 5
    action_button_up_short:
      - type: turn_on
        device_id: 828646d542008f804f93f384f34ac360
        entity_id: switch.lamp_outlet_0bc3a0fe_on_off
        domain: switch
    helper_last_controller_event: input_text.switch2lastinput
    action_button_up_long:
      - service: media_player.volume_up
        target:
          device_id: 15f26b5b264d15150e2a149e689ed6bd
    action_button_down_short:
      - type: turn_off
        device_id: 828646d542008f804f93f384f34ac360
        entity_id: switch.lamp_outlet_0bc3a0fe_on_off
        domain: switch
    action_button_down_long:
      - service: media_player.volume_down
        target:
          device_id: 15f26b5b264d15150e2a149e689ed6bd
    controller_device: 16d14df2ecd573581fa1debd28a52dde

Hi, @epmatt
Great blueprint.
Short press work fine with turning on/off.
But LongPress doesnā€™t seem to do much :-/

Questionā€¦

  • Is the ā€˜(Optional) Up button long press - loop until releaseā€™ required when using long press?
  • If so, what is a feasible value for ā€˜number of repeatsā€™ ?
  • How often does it loop per second (if that is how it works?)

(Optional) Up button long press - Maximum loop repeats

Maximum number of repeats for the custom action, when looping is enabled. Use it as a safety limit to prevent an endless loop in case the corresponding stop event is not received.

Tried this blueprint with zigbee2mqtt.

In my case no _action entitiy is shown, only the _battery entitiy is selectable in the dropdown.

Any ideas? (Button works with an simple automation, but I want to use the dimming feature.)

1 Like

Just fell into this blueprint after recently adopting Zigbee along with the IKEA STYRBAR 4 button controller and matching bulb.

Is there anyway to add the action to cycle through the ā€˜hueā€™ of the bulb by pushing left/right like you would do with a normally paired button?

PS
Love the blueprint and my first ever use of one :slight_smile:

1 Like

Hey @epmatt, Iā€™m experiencing the same issue as @aceindy. With zigbee2mqtt and the latest version of home assistant (2022.3.8) / this blueprint (2021.10.26), only the short presses work. The E1743 switch itself is on firmware (2.2.010). It seems like one of the automation conditions are failing for some reason on a long or double press. Attached is the automation trace in case itā€™s useful.

Actually, long press seems to work, but the repeat doesnā€™tā€¦(has to be disabled)

Looking at long press up/down as well,ā€¦ Trying to configure the blueprint by remote (on my brothers HA instance - he lives 300km away)ā€¦
How would one con figure the long press up/down to dim the the selected entities up/down ?

1 Like