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

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

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.

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

:video_game: Supported Controllers

:information_source: Changelog

Updated list of changes and improvements is available here.

Happy automating to everyone! :fire:

4 Likes

Hi there,

I’ve published an update for this blueprint, which adds support for the IKEA E1812 Shortcut button and fixes a naming issue for the IKEA E1743 Wireless Dimmer.

:warning: If you had previously used this blueprint with an IKEA E1743 and you’d like to update it, you’ll need to fix your current automations. Please make sure that the value for the Controller model input in automations generated by this Hook is exactly equal to “ IKEA E1743 On/Off Switch & Dimmer ”.

Happy automating! :tada:

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…