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

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

Hi @aceindy @jabelone,

thank you so much for reaching out here. Iā€™m sorry for the huge delay, unfortunately Iā€™m very busy at the moment and Iā€™m unable to keep up with all the support requests Iā€™m receiving both here and on GitHub. I hope you can understand.

Could you please share the full YAML for the automations youā€™re trying to setup with this blueprint?

Thanks! :+1:

Hi @Calzor_Suzay,

thank you so much for your nice feedback! Iā€™m glad that this blueprint is useful for you. :smiley:

If you want to control an RGB bulb with a controller, you can try the Light Hook blueprint. An example of the setup you could try to implement is reported here on the Controllers-Hooks Ecosystem docs.

Please let me know if you need any additional guidance. Iā€™d be happy to help. :+1:
Thanks!

Heya! Thanks for replying. No need to apologise, I know what itā€™s like running an open source project in your spare time!

I ended up having to use several automations instead of this blueprint as I couldnā€™t get it working (nor the other E1743 one, but for a different reason); so I donā€™t have it setup right now.

Itā€™s possible I will forget to do this so I wonā€™t commit to anything, but Iā€™ll do my best to set it up again in the next few days and get you a copy of the YAML.

Let me know if youā€™d rather keep track via a GitHub issue if that is more convenient for you as this seems to be a bug experienced by more than just me. :slight_smile: It looks similar to this one, but my gut feeling is this is a separate underlying issue so Iā€™d probably create a new issue to track the discussion.

Cheers!

Talk about weird! I got a chance to set this blueprint up again to get you the config and itā€™s working perfectly now. The only thing that changed was a minor point update to home assistant. No idea whatā€™s going on but it seems to be working now at least! :man_shrugging:

I just moved from Deconz to Z2M and tried to import this Blueprint. I always get an ā€œUnknown errorā€. Iā€™m already on 2022.5.0 so maybe that update broke this Blueprint?

Unfortunately i am facing the same issue with HA 2022.5.0. The Import of the blueprint can not finished with an Unkown Error.

Any chance to fix that?