šŸŽ® 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 @bipsen,

sorry for my late response. I eventually found what was causing your issue: in detecting the double press action, a comparison between 2002 from the action_mapping variable, and '2002' from the text helper was made. The condition would always produce a falsy value when using deCONZ, since comparing a number and a string returns false.

Iā€™ve just updated the blueprint with the fix. Please let me know if the automation now works as expected. :slight_smile:

Moreover, Iā€™d like to point out that the problem was present on the majority of controller blueprints. Your feedback helped to improve all of them as well, so thank you very much for reporting. :slight_smile:

1 Like

Hi @epmatt

For some reason I still seem to have issues.
Should the helper be of type text or number ?

Tried to delete automation and blueprint, re-import blueprint and create automation again.

New automation code:

- id: '1618861271656'
  alias: (BP) Switch off outdoor light on doubleclick
  description: Switch off outdoor light on doubleclick
  use_blueprint:
    path: EPMatt/ikea_e1743.yaml
    input:
      integration: deCONZ
      controller_device: 289eff47b12c36ea2065aa727ea04beb
      action_button_down_double:
      - service: persistent_notification.create
        data:
          message: double click
      helper_last_controller_event: input_text.btn_driveway
      helper_double_press_delay: 2000
      button_down_double_press: true

Hi @bipsen,

sorry for my late response. Iā€™ve opened a Pull Request which will hopefully solve this issue. Iā€™m now waiting for confirmation that the problem is solved for the user who opened the linked issue on GitHub.

In the meantime, you can test PR changes by importing the following blueprint into your Home Assistant instance.

Thank you!

I get the double click notification nowā€¦ Great :smiley:

1 Like

Hi @bipsen,

Iā€™m glad to hear that your issue is solved. The blueprint accessible via the official link has now been updated with the fix. :slight_smile:

Thank you for your feedback, and happy automating! :rocket:

Ciao Matteo,

Iā€™m using a couple of your automations, your work is excellent, thank you for sharing all these automations/blueprints.

Iā€™d love to use this specific one, but for the switches I use in my house, I have 10 OSRAM Smart+ Switch Mini, I guess it wouldnā€™t work.

Iā€™ve found another blueprint that supports that switch, but itā€™s specific for Zigbee2MQTT.

Since you are trying to support all platforms for each switch, I was wondering if you could make a version of your blueprint for that switch, or if you can help me understand what I need to modify to adapt it to that device.

Thank you again for your contributions, I really appreciate it.

Alessandro

1 Like

Iā€™m also using a couple of your Blueprints and they are awesome! Thank you so much for giving that to the community.

2 Likes

Hi @alexdelprete, thank you for your feedback! Really appreciate it. :tada:

Iā€™d love to use this specific one, but for the switches I use in my house, I have 10 OSRAM Smart+ Switch Mini, I guess it wouldnā€™t work.

Yeah, we need to develop a Controller blueprint specifically for the OSRAM Smart+ Switch Mini. Iā€™ve just opened an issue on the Awesome HA Blueprints GitHub repository to track the progress of your feature request:

Iā€™ll try to look around for ZHA and deCONZ action mappings for this remote, so we can implement support for those integrations as well. Iā€™ll let you know as soon as the blueprint is ready for testing. :slight_smile:

By the way, which integration are you using to connect the OSRAM Switch to Home Assistant?

Thank you for the suggestion!

1 Like

Hi @jesc,

thank you so much for your nice feedback! Iā€™m happy these blueprints are useful for you. :wink:

You might also want to look at the integration I linked in previous post, thereā€™s a trigger section that the dev says is necessary because of the way the switch behaves.

If you need me to test/debug something for you, please let me know, I use ZHA with a Connbee II. If I can help finding the action mappings please instruct me on how to do it and Iā€™d be glad to help you.

For now Iā€™ve done everything manually with standard automation, I have 1 automation for each button for each switch. The list of automations is exploding since I have many switches. Thatā€™s why I need something like your integration. :slight_smile:

Grazie Matteo, non so come ringraziarti. :slight_smile:

1 Like

Ciao @alexdelprete,

You might also want to look at the integration I linked in previous post, thereā€™s a trigger section that the dev says is necessary because of the way the switch behaves.

Thank you for pointing it out, Iā€™ll include that required check in the blueprint. :slight_smile:

If you need me to test/debug something for you, please let me know, I use ZHA with a Connbee II. If I can help finding the action mappings please instruct me on how to do it and Iā€™d be glad to help you.

As reported in the linked GitHub issue, I was able to identify the mappings for both ZHA and deCONZ, but thank you for being available anyway.
Itā€™d be extremely helpful if you could test the blueprint before making if publicly available. Iā€™ll let you know on GitHub as soon as the PR with the new blueprint is ready for testing. :+1:

For now Iā€™ve done everything manually with standard automation, I have 1 automation for each button for each switch. The list of automations is exploding since I have many switches. Thatā€™s why I need something like your integration. :slight_smile:

Great to know, so a blueprint will definitely be useful in your use case. :wink:

Thank you for your help and for your suggestion!

Yes, thanks to you I found the relevant page: https://xaviml.github.io/controllerx/controllers/OSRAM-AC025XX00NJ. Z2M actions are missing, but hopefully you can get those from the other blueprint.

Absolutely, canā€™t wait to help you in any possible way. Let me know. :slight_smile:

It will be fantastic, right now my automations list requires me to scroll down some pages, one automation for each button of each switch/controller. You can imagine the chaos, and I donā€™t like chaos. Thatā€™s why I asked if you could support the controller Iā€™m using. :slight_smile:

Actually I also use this: Hue Smart Button (Philips) | ControllerX (xaviml.github.io), but I only have 2 of them, so I can afford to have 4 automations for them, maybe Iā€™ll open a FR on your github for this. :slight_smile:

Thanks again.

Hi @alexdelprete,

Great, weā€™ll get in touch for testing the new blueprint. I also saw your other FR on GitHub, Iā€™ll look into that after weā€™re done with the OSRAM remote. :slight_smile:

It will be fantastic, right now my automations list requires me to scroll down some pages, one automation for each button of each switch/controller. You can imagine the chaos, and I donā€™t like chaos. Thatā€™s why I asked if you could support the controller Iā€™m using. :slight_smile:

I can imagine how many automations youā€™re currently runningā€¦but luckily Controller blueprints are here to help. :wink:

Thank you!

1 Like

iā€™m getting error on long press trying to dimm:
alias: Controller - IKEA E1743 On/Off Switch & Dimmer
description: ā€˜ā€™

use_blueprint:
  path: EPMatt/ikea_e1743.yaml
  input:
    integration: Zigbee2MQTT
    controller_entity: sensor.telecomando_onoff_ikea_cucina_action
    action_button_up_short:
      - type: turn_on
        device_id: a97331ef70763a48c306b687aaef7254
        entity_id: light.luce_camera_da_letto
        domain: light
        brightness_pct: 100
        flash: long
    action_button_up_long:
      - type: brightness_increase
        device_id: a97331ef70763a48c306b687aaef7254
        entity_id: light.luce_camera_da_letto
        domain: light
    action_button_up_release: []
    action_button_down_short:
      - type: turn_off
        device_id: a97331ef70763a48c306b687aaef7254
        entity_id: light.luce_camera_da_letto
        domain: light
    action_button_down_long:
      - type: brightness_decrease
        device_id: a97331ef70763a48c306b687aaef7254
        entity_id: light.luce_camera_da_letto
        domain: light
    button_up_long_loop: true
    button_down_long_loop: true
    button_up_double_press: false
    button_down_double_press: false

log while long press:

2021-05-23 01:29:21 ERROR (MainThread) [homeassistant.components.automation.controller_ikea_e1743_on_off_switch_dimmer] Controller - IKEA E1743 On/Off Switch & Dimmer: Choose at step 2: choice 5: Choose at step 1: choice 1: Error executing script. Invalid data for call_service at pos 1: not a valid value for dictionary value @ data['entity_id']
2021-05-23 01:29:21 ERROR (MainThread) [homeassistant.components.automation.controller_ikea_e1743_on_off_switch_dimmer] Controller - IKEA E1743 On/Off Switch & Dimmer: Choose at step 2: choice 5: Error executing script. Invalid data for choose at pos 1: not a valid value for dictionary value @ data['entity_id']
2021-05-23 01:29:21 ERROR (MainThread) [homeassistant.components.automation.controller_ikea_e1743_on_off_switch_dimmer] Controller - IKEA E1743 On/Off Switch & Dimmer: Error executing script. Invalid data for choose at pos 2: not a valid value for dictionary value @ data['entity_id']
2021-05-23 01:29:21 ERROR (MainThread) [homeassistant.components.automation.controller_ikea_e1743_on_off_switch_dimmer] Error while executing automation automation.controller_ikea_e1743_on_off_switch_dimmer: not a valid value for dictionary value @ data['entity_id']

and on short press i get these warning but is working:

2021-05-23 01:29:28 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'click' when rendering '{{ value_json.click }}'
2021-05-23 01:29:28 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'action' when rendering '{{ value_json.action }}'

Hi @FrancYescO, thank you for reporting.

Since your device in connected to HA via Zigbee2MQTT, you need to provide a valid input_text entity for the helper_last_controller_event input.

Moreover, Iā€™d suggest you to update the blueprint to the latest version Iā€™ve just published. Please read the changelog in the original post to learn more about whatā€™s changed. With the latest update, the helper_last_controller_event input is strictly required.

To learn more about the helper_last_controller_event, how itā€™s used an why itā€™s required, you can read this section in the official documentation.

The warnings you see in the logs are not relative to this blueprint, but on how Zigbee2MQTT exposes the device itself to Home Assistant. Which version of Zigbee2MQTT are you running?

Thanks!

Okey iā€™ve added the helper_last_controller_event input_text and it started working, pretty laggish (ie i keep pressing O to dim a bit than release and short press it will not turn off the light, wait ~10sec and it will start back working) no more errors in the logs but warnings still here on each button press.

probably itā€™s due to the Zigbee2mqtt integration or idk but the long press action to dim is just unreliable

Zigbee2MQTT is keeped updated (or at least it should autoupdate) so actually is 1.18.1-1, but i see that 1.18.3 is outā€¦

EDIT:
okay upgraded to 1.18.3-1 (they changed github repo URL and never noticedā€¦), still having this warning on each button press, and long press, working a bit but still causing unreliability

2021-05-27 17:44:04 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'click' when rendering '{{ value_json.click }}'
2021-05-27 17:44:05 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'click' when rendering '{{ value_json.click }}'

Hi @FrancYescO, thank you for your feedback.

The warnings youā€™re reporting are probably relative to Zigbee2MQTT still not reporting entity states as expected by Home Assistant, since we are not using any click variable in the blueprint templates.

Regarding the stability issues, I suggest you to test the blueprint with custom actions such as the following:

- service: persistent_notification.create
  data:
    message: Button clicked

This action doesnā€™t rely on any external integration which might cause stability issues (e.g. if your lights are connected via Zigbee2MQTT too, the messages sent by the remote can slow down the network, especially if youā€™re using a slow Zigbee Coordinator such as the CC2531).

Let me know if you have any news regarding this issue.
Thanks! :slight_smile:

i moved over from Zigbee2MQTT to ZHA (no hardware changes) and i got it working, probably you should consider not working some behaviours with Z2M

1 Like

Hi @FrancYescO,

Thank you for your feedback. Iā€™m glad to hear that your issue is solved. :slight_smile:

probably you should consider not working some behaviours with Z2M

Multiple users reported the controller blueprint fully working with Zigbee2MQTT; the issue might be with your Zigbee coordinator not being completely supported by Zigbee2MQTT (such as the Conbee II, whose support is currently experimental) or with the USB stick being too little for your Zigbee network (such as the TI CC2531 with 20+ devices paired, which can cause multiple stability issues).

Thanks again, and happy automating!

Trying to set this up with an ikea 5 button remote and the light hook. I have confirmed the remote is sending messages and tried it with another blueprint, it worked as expected. I am trying to use the light hook.

I get no actions being executed.
I see this error but as I am using zha I have left the entity empty and used the device.


Stopped because an error was encountered at June 3, 2021, 2:42:32 PM (runtime: 0.03 seconds)

not a valid value for dictionary value @ data['entity_id']``


id: '1622756436747'
alias: 5 button ikea remote
description: ''
use_blueprint:
  path: EPMatt/ikea_e1524_e1810.yaml
  input:
    integration: ZHA
    controller_device: 92caab6580bcd8362a33f4726e041578

and the light hook config

alias: living room light
description: ''
use_blueprint:
  path: EPMatt/light.yaml
  input:
    light_color_mode: Auto
    controller_device: 92caab6580bcd8362a33f4726e041578
    controller_model: IKEA E1524/E1810 5-Button remote
    light: light.living_room_lights

`I am probably not understanding the use of hooks. Do I still need to choose the button actions in the controller blueprint?

Any other info I can give just ask.

thanks