🔌 Light Hook - Control any light (RGB, color temp, brightness) with one of the supported controllers

Hello,

i can’t understand how this works!
I made an automation called “Controller - IKEA E1743 On/Off Switch & Dimmer” based on the corresponding blueprint.
Now i’m trying to put this automation in the “Controller Entity” field but I can’t find it.
I’m doing right?

Thank you

Hi @napalmz,

in the Controller Entity input you should specify the same entity_id you used to configure the Controller blueprint.
e.g. if you set up a Controller blueprint with the Zigbee2MQTT remote input set to sensor.e1743_action, the value for the Controller Entity input in this Hook should be sensor.e1743_action.

I’m aware that as of today docs for the Controllers-Hooks ecosystem aren’t clear on how the whole system works and how to setup controller-based automations. I’m working on them to improve their general quality, as well as provide examples and better explanations on how things work under the hood. This project definitely needs better documentation. :slight_smile:

Please let me know if everything runs as expected.
Thanks!

1 Like

Hi I have correctly configured an ikea 1743 button, I have set the controller automation and configured the hook, the light turns on and off but if I hold down the button or if I double click, the brightness does not adjust and the color does not it changes.
i think it is due to the input text configuration, how can i fix?
i have no idea how to configure an input text for the 1743 switch entity.

Hi @roberto87, thank you for reporting here.

Yes, you need to provide a valid input_text for the helper_last_loop_event_input input.

You can simply create a new input_text entity via the Home Assistant UI (Configuration->Helpers->Add helper), then providing it to the Controller Blueprint.

This should fix your issue. :+1:

Thanks now it works perfectly!
Now I’m trying to configure the symfonisk dimmer to control a media player, I followed the instructions and I can only increase the volume of the receiver, in the input text created I can only see the brightness_move_up text and when I try to turn left or click the button does not change the input text. in zigbee2mqtt config I have correctly set the entity with: legacy: false
How can I solve?

Hi @roberto87,

Happy to hear that the E1743 with the Light Hook is working smoothly. :tada:

We can continue the discussion about the Media Player Hook in the respective thread:

Thanks!

This is frustrating, to say the least…
If you follow the short documentation in the blueprints this doesn’t work. And if you try to follow the links to further documentation, you are presented with a “page not found error”

Hi @praun80,

I’m really sorry for what you’re experiencing with this blueprint.

While updating the documentation website, some links might have been broken. I’ve just edited the original post, you’ll find the updated link to full docs for this blueprint there.

If you need additional info or have any doubts on how to setup this blueprint, please let me know. I’m here to help. :slight_smile:

Hi there!

to @praun80, @napalmz and anyone interested in this.

In the past days I worked on improving documentation for the Controllers-Hooks Ecosystem; I’ve just completed the update.

You can read docs for Controllers and Hooks here. I’ve also included some usage examples, as well as different configuration scenarios for controller-based automations.

I hope docs are able to address many doubts regarding the setup of such blueprints. If not, please report it here, I’d be happy to help, or to simply hear your opinion on the new documentation. :slight_smile:

Thank for your effort!
Now, this is my setup.

Controller automation:

alias: Controller - IKEA E1743 On/Off Switch & Dimmer
description: ''
use_blueprint:
  path: EPMatt/ikea_e1743.yaml
  input:
    integration: deCONZ
    remote: d3433a7ab6351e3017e3bf39f826493d
    action_up_short:
      - type: turn_on
        device_id: 7b95dc0138cd5f3d5a2d4bde38a21011
        entity_id: light.dimmable_light_5
        domain: light
        brightness_pct: 100
    button_up_long_loop: true
    button_down_long_loop: true
    action_up_long:
      - type: brightness_increase
        device_id: 7b95dc0138cd5f3d5a2d4bde38a21011
        entity_id: light.dimmable_light_5
        domain: light
    action_down_short:
      - type: turn_off
        device_id: 7b95dc0138cd5f3d5a2d4bde38a21011
        entity_id: light.dimmable_light_5
        domain: light
    action_down_long:
      - type: brightness_decrease
        device_id: 7b95dc0138cd5f3d5a2d4bde38a21011
        entity_id: light.dimmable_light_5
        domain: light
    action_up_double: []
    action_down_double: []

And this is the hook:

alias: Hook - Light - Pensili Cucina
description: ''
use_blueprint:
  path: EPMatt/light.yaml
  input:
    light_color_mode: Hue - Saturation
    controller_device: d3433a7ab6351e3017e3bf39f826493d
    controller_model: IKEA E1743 On/Off Switch & Dimmer
    light: light.dimmable_light_5
    light_transition: 250

What I expect is that a long up press progressively increase brightness and a long down one decrease it.
What I get is an increment so fast that I can’t control it, in 2 seconds of long pressure the light is already at maximum or off. I had partially solved it by introducing a delay in the controller but I wanted to understand at this point what I needed the hook if I have already solved without.

Hi @napalmz, thank you for reporting.

What I get is an increment so fast that I can’t control it, in 2 seconds of long pressure the light is already at maximum or off.

Yeah, other users reported the same issue with the Light Hook, that is, not being able to tune the brightness steps. I’m working on adding an input for the Light Hook to allow better tuning of the brightness control feature. :+1:

If you’re using the Hook, you can remove all the custom actions you provided to the Controller blueprint.
On the other hand, if you want to use custom actions you can safely delete the Hooks automation and proceed only with the Controller blueprint. Having both of them activated probably contributes to the really fast brightness transition 0-100 you’re experiencing.

I wanted to understand at this point what I needed the hook if I have already solved without.

Hooks can be particularly useful for users which don’t want to write any custom action for common functionality (such as controlling lights etc.).

Think of them like a safe and easy “Plug and Play” solution. Of course, if you want more control on actions to perform with your controller, you can directly write custom actions in the controller blueprint, which can also run alongside a Hook (eg. if you want to extend the Hook functionality).

You can find more info here. :slight_smile:

Here’s the thing: I didn’t realize that using the HOOK I could remove individual actions from the controller. Now I have tried and it actually works quite well, my problems were with interference between the controller actions and the hook.
So now I have another request: is there any way to specify the initial brightness of the light? Now I have seen that at any brightness I turn it off it turns on again to a minimum and then I can increase it.
Could you record the last brightness in a variable and then be able to restore it the next time you turn it on? Or establish a “default brightness”?

Thank you

Hi @napalmz, sorry for my late response. Happy to hear that everything runs smoothly. :+1:

So now I have another request: is there any way to specify the initial brightness of the light? Now I have seen that at any brightness I turn it off it turns on again to a minimum and then I can increase it.
Could you record the last brightness in a variable and then be able to restore it the next time you turn it on? Or establish a “default brightness”?

Thank you for your suggestion :slight_smile: I’ve just published an update which includes the following, as stated in the changelog:

  • set minimum and maximum light brightness
  • specify number of steps from min to max brightness, both for short and long actions, when controlling the light
  • allow to force brightness to a specific value when turning on the light

This is not a breaking change: many inputs have been added to the blueprint, but all of them have default values already assigned to them.

The feature you requested should now be implemented. Please let me know if everything runs as expected.

Happy automating!

Good morning @epmatt,
i just tried it and it works perfectly!
Now I beg to ask you a new request: is it possible to parameterize a variable where to save the last brightness value that the light had before turning it off so that it can be restored when turned on?
Maybe with a series of steps: restore the last value, if there is no force one (if required a fixed value by parameter) or start at the minimum as it once was.

After that I can also pay you a coffee! :smile:

Good morning @napalmz, happy to hear that!

In my experience, lights generally maintain the same brightness level they had before being turned off. Just for asking, which devices are you using?

By the way, it’s definitely an interesting feature which might be useful for users in the same situation as yours. I think the best option is to make it an optional input, so if the light already saves the “last brightness” value, we can avoid providing an input which would be useless. :slight_smile:

Thank you for the suggestion!

Thank you, would be great!

My device is a “IKEA Tradfri LED Driver for Wireless Control 10 W” that comes also in 30W variant (and i need to replace it soon as my OMLOPP lights are 3 of 7.7W each and puts driver in “panic mode” as they absorb too much power).

Hi @napalmz,

Oh great, that’s probably a really common device, so this feature might be useful to many other users.

Thank you, I’ll let you know as soon as the feature gets implemented. :+1:

I am having trouble using this. the first step in setting it up says…

Integration Select Required
Integration used for connecting the remote with Home Assistant. Select one of the available values.

where is this done? it seems to be missing?

am I understanding correctly that this blueprint will add additional functionality to the blueprint I am using to dim my lights…

Hi @applesauce, I’m sorry for my late response.
First of all thank you for checking out these blueprints and for reporting here. :slight_smile:

Integration used for connecting the remote with Home Assistant. Select one of the available values

This input is part of one of the Controller blueprints, there’s no such input in the Light Hook. The Integration input is used in Controller blueprints to provide the integration you used to connect the controller with Home Assistant (Zigbee2MQTT, deCONZ, ZHA), which is required by the blueprint to correctly parse the RAW messages received from the device.

am I understanding correctly that this blueprint will add additional functionality to the blueprint I am using to dim my lights…

Not exactly, to use the light Hook you’ll need to setup a Controller blueprint first, as stated in documentation. Each Controller blueprint provides functionality for a different controller model; you can check out the full list of supported controllers in the documentation, which currently includes 6 devices mostly from IKEA.

The complete setup comprises two automations: one created with a Controller blueprint, the other one created with the Light Hook blueprint.
I highly suggest you to take a look at the Controllers-Hooks Ecosystem documentation, which describes how the two blueprint categories interact together, and lists different features you can achieve by configuring Controllers and Hooks in different ways, with clear YAML configuration examples.

If you have any additional doubts or you need further guidance to setup automations created with these blueprints I’d be happy to assist you, just let me know. :slight_smile:

Thank you!

1 Like

HI @epmatt

Thanks for these amazing blueprints.
You really saved us a lot of time figuring out how all these devices work with HA.

I have one issue, here is my setup:
I used your controller blueprint to create an automation for my IKEA ICTC-G-1 TRADFRI wireless dimmer, with no custom actions on it.
Then used your light hook to control my Ikea Tradri bulb.
When I rotate the dimmer, it starts to gradually increase/decrease until it reaches the max setting (1/255), depending on the “(Optional) Light brightness steps - long actions” value that is set.
I cannot set it to my preferred brightness. As long I start to rotate it, it will not stop until it reaches the max setting.

How can I stop this?
All I want is to have the dimmer work as it was intended: smoothly increase/decrease the brightness when rotating slowly, on/off when rotating it fast.
Is it possible to achieve that result with your blueprints and hooks?
Is it also possible to adjust the smoothness/steps of the brightness when slowly rotating the dimmer in order to achieve the perfect result?

Thanks again for your contributions