šŸŽ® ZHA, deCONZ, Zigbee2MQTT - Ikea ICTC-G-1 TRADFRI wireless dimmer Universal blueprint - all actions - control lights, media players and more with Hooks

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

IKEA ICTC-G-1 TRƅDFRI wireless dimmer|200X200

This blueprint provides universal support for running any custom action when a button is pressed on the provided IKEA ICTC-G-1 TRƅDFRI wireless dimmer. Supports controllers integrated with deCONZ, ZHA, Zigbee2MQTT. Just specify the integration used to connect the remote to Home Assistant when setting up the automation, and the blueprint will take care of all the rest.

In addition of being able to provide custom actions for every kind of button press supported by the remote, the blueprint allows to optionally loop the rotate actions while the remote is rotating either left or right. Once the remote stops rotating, the loop stops as well. This is useful when rotating the controller should result in a continuous action (such as lowering the volume of a media player, or controlling a light brightness).

Automations created with this blueprint can be connected with one or more Hooks supported by this controller.
Hooks allow to easily create controller-based automations for interacting with media players, lights, covers and more. See the list of Hooks available for this controller for additional details.

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

:electric_plug: Available Hooks

:bulb: Light

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.

Light Hook docs

:loud_sound: Media Player

This Hook blueprint allows to build a controller-based automation to control a media player. Supports volume setting, play/pause and track selection.

Media Player Hook docs

:information_source: Changelog

Updated list of changes and improvements is available here.

Happy automating to everyone! :fire:

4 Likes

Hi,

Thanks for this blueprint. Does it work with this?

SYMFONISK Sound remote, black - IKEA

Hi @Kaz,

this blueprint is specifically for the IKEA ICTC-G-1 controller, but good news, the same one is available for the SYMFONISK controller as well. Hereā€™s the link to the related forum topic. :slight_smile:

Moreover, you can always browse the full list of available Controller blueprints here.

Happy automating!

Thank you. I will check it out :slight_smile:

1 Like

Has anyone got this working with ZHA? Iā€™ve tried setting it to just change the brightness of one lamp up and down when I turn left and right. Nothing seems to change on the lamp though (connected via the Hue integration). I think these IKEA devices are a bit weird staying connected to ZigBee networks but if I listen for ZHA events I can see them coming through when I turn the knob.

Hi @Count.Zilch, thank you for reporting.

I think these IKEA devices are a bit weird staying connected to ZigBee networks but if I listen for ZHA events I can see them coming through when I turn the knob.

As far as my little experience with IKEA controllers goes, remotes usually donā€™t disconnect from the Zigbee network. The main problem is though they sometimes send duplicate events eg. when rotating the knob or pressing the button (especially the E1812 shortcut button, which fires 6 events in average when pressing the button once).

Iā€™ve tried setting it to just change the brightness of one lamp up and down when I turn left and right.

Could you please post here the YAML for the automation youā€™ve setup? You can grab it by navigating to Configuration->Automations->Edit Automation (the pencil icon part of the automation row), then clicking on the 3 dots on the top right->Edit as YAML.
Moreover, do you notice any entries in the Home Assistant log related to this blueprint?

Thank you! :slight_smile:

Hi Matteo. Thanks so much for the prompt reply. Iā€™ve attached the YAML. For testing I have changed this so it should (if I understand correctly) turn one of the downlights above me on or off. Idelly it will do brightness or something. I assuming for this type of basic functionality I donā€™t need to use hooks or set anything else up? There are some log errors. Iā€™ve posted them as well.

alias: Test Library Wireless Dimmer Knob
description: ''
use_blueprint:
  path: EPMatt/ikea_ictc_g_1.yaml
  input:
    integration: ZHA
    controller_device: 0ed58ebd0dd0fe932cbaf840bbce125f
    action_rotate_left:
      - type: turn_off
        device_id: 87dd712372724753a14cb63499ceb74a
        entity_id: light.library_downlight_1
        domain: light
    action_rotate_right:
      - type: turn_on
        device_id: 87dd712372724753a14cb63499ceb74a
        entity_id: light.library_downlight_1
        domain: light
        brightness_pct: 100
    rotate_left_loop: false
    rotate_right_loop: false
Logger: homeassistant.components.automation.test_library_wireless_dimmer_knob
Source: helpers/script.py:1334
Integration: Automation (documentation, issues)
First occurred: 14:01:02 (586 occurrences)
Last logged: 20:40:13

Test Library Wireless Dimmer Knob: Choose at step 2: choice 3: 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']
Test Library Wireless Dimmer Knob: Choose at step 2: choice 3: Error executing script. Invalid data for choose at pos 1: not a valid value for dictionary value @ data['entity_id']
Test Library Wireless Dimmer Knob: Error executing script. Invalid data for choose at pos 2: not a valid value for dictionary value @ data['entity_id']
Test Library Wireless Dimmer Knob: Choose at step 2: choice 1: 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']
Test Library Wireless Dimmer Knob: Choose at step 2: choice 1: Error executing script. Invalid data for choose at pos 1: not a valid value for dictionary value @ data['entity_id']

Hi @Count.Zilch, thank you for your quick feedback.

Your configuration is missing a value fot the helper_last_controller_event input, which is required for the blueprint to work when the remote is integrated with either Zigbee2MQTT or ZHA, as stated here in the documentation. The reason why the input is required is described in the Additional Notes.

Please provide a valid text input for the helper_last_controller_event input, then try again and check if your issue is solved. You donā€™t need a particular text input, just create a brand new one in Configuration ā†’ Helpers. :slight_smile:

Thank you!

Thanks for the help @epmatt! Sorry if Iā€™m being dim about this:

  1. I believe that the input_text integration is already installed
  2. Iā€™ve gone into the config and created Helper:
  • Name: helper_last_controller_event
  • Icon: Blank
  • Minimum L\length: 0
  • Maximum length: 100
  • Display mode: Text
  • Regex patter: [Blank]
  • Entity ID: input_text.helper_last_controller_event
  • Area: [Blank]
  • Entity Enabled: [Checked]

I restarted HA but I am still getting the @ data[ā€˜entity_idā€™] errors in the logs. Can you confirm what Iā€™ve missed? Thanks!

Hi @Count.Zilch, sorry for my late response. Thank you for your feedback.

Sorry if Iā€™m being dim about this:

Donā€™t worry, Iā€™m glad to help as I can. :slight_smile:

The only thing missing is adding the text input to your blueprint configuration, like so:

alias: Test Library Wireless Dimmer Knob
description: ''
use_blueprint:
  path: EPMatt/ikea_ictc_g_1.yaml
  input:
    integration: ZHA
    controller_device: 0ed58ebd0dd0fe932cbaf840bbce125f
    action_rotate_left:
      - type: turn_off
        device_id: 87dd712372724753a14cb63499ceb74a
        entity_id: light.library_downlight_1
        domain: light
    action_rotate_right:
      - type: turn_on
        device_id: 87dd712372724753a14cb63499ceb74a
        entity_id: light.library_downlight_1
        domain: light
        brightness_pct: 100
    rotate_left_loop: false
    rotate_right_loop: false
    helper_last_controller_event: input_text.helper_last_controller_event

Iā€™d also like to mention that if you have multiple controllers, youā€™ll need to setup a separate text input for each Controller blueprint youā€™ll configure. You donā€™t need to name the text input helper_last_controller_event explicitly: you just need to pass the text entity in the blueprint configuration, as described above.

Please let me know if adding the missing input solves your issue. :wink:

Thank you!

I guess Iā€™ll pick off from where this was left.
Hi @epmatt I have configured as required (I think). I have the text helper and all.

alias: ikea-dimmer1
description: ''
use_blueprint:
  path: EPMatt/ikea_ictc_g_1.yaml
  input:
    integration: ZHA
    controller_device: 63f40cf05fc77c62e90091e04ef3caaa
    action_rotate_left:
      - type: turn_off
        device_id: 1e81df92227756d02a1d480d955944bd
        entity_id: light.shellyrgbw2_fc9e06
        domain: light
    action_rotate_right:
      - type: turn_on
        device_id: 1e81df92227756d02a1d480d955944bd
        entity_id: light.shellyrgbw2_fc9e06
        domain: light
    helper_last_controller_event: input_text.dimmer1_helper
    action_rotate_right_stop: []

The helper is:

And the dimmer is:

Nothing happens tho, not sure if it is the dimmer or the automation. Canā€™t see any errors.

Iā€™ll reply as well, I just switched over from deconz to zha and was hoping I could get those old remote working finally (picked up a handful on the clearance shelf a while back), and while before the problem was that I never received any events from it, now thatā€™s working fine but itā€™s still not doing anything. Basically the exact same as the poster above me, helper entity is configured and does update with the last event, but the actions do not get triggered.

Looks like this has been abandoned, as @epmatt wonā€™t reply anymore to this project. Weā€™ll have to either find a solution ourselves or just move on. If I ever find something functional Iā€™ll reply here.

Hi. Just dropping a comment to say that the Media Player Hook doesnā€™t work very well for this device with Google Home speakers, when it comes to controlling volume.

So, just using an automation based on this blueprint and using volume_set with a template instead, works much, much better.

    action_rotate_right:
      - service: media_player.volume_set
        target:
          entity_id: media_player.salon
        data:
          volume_level: "{{ state_attr('media_player.salon', 'volume_level') +0.02 }}"

Iā€™m using it glued to the back of a Lenovo Display 7, but not to control the device itself (itā€™s right there), but to control the group instead.

Iā€™m considering getting a Symfonisk remote, but getting to use these old remotes that I had abandoned is great.

PS: Iā€™m not having any of the issues above. Working great with Zigbee2MQTT. Plus, this blueprint was updated in August so maybe that helps too.

When turning the device all the way to the left (off position) it lowerā€™s the brightness of the light to the minimum possible value, but it never turns it off (with this controller and the related ā€œHook - Lightā€).
By default, when paired normally to an IKEA bulb, it turns it off when you continue turning the device after the minimum brightness value is reached.
Does any of you know if this can be replicated?

I had the same problem you and @pietdevries had and I managed to find the root cause for it: as it turns out, some zha_events associated with the actions of Ikea controllers have changed, not sure if itā€™s related to a new version of the ZHA plugin or the firmware on the controllers itself, eitherway, the blueprint is using obsolete or incomplete actions sets when this happens.

I added the new actions to both the controller and hooks files and also took the opportunity to add the handling of quick rotation events (as when used with the Ikea gateway directly).

Thereā€™s a pull request open where you can get the updated files, hoping that @epmatt will get back to this project.

1 Like

Hi!
Could you please give some detailed instructions on how you did this?
Not used to work with tamplates. Thanks in advance.

No longer using these devices, but I still have some Symfonisk that are similar.

Full automation below.

Since HA reverted a change where the Google Home speaker volume was always exposed, and now only when itā€™s not off, I had to add an if off else to still be able to control volume while itā€™s off. When itā€™s on, I can adjust the volume in 0.02 intervals (much more precise than the normal volume change that happens when off).

alias: "[Zigbee2MQTT] E1744 Symfonisk BaƱo 2"
description: ""
use_blueprint:
  path: EPMatt/ikea_e1744.yaml
  input:
    integration: Zigbee2MQTT
    controller_entity: sensor.symfonisk_salon_action
    helper_last_controller_event: input_text.last_controller_event_symfonisk_e1744_bano
    action_rotate_left:
      - if:
          - condition: device
            device_id: d966fcaa662bd9cfd919d7861b178073
            domain: media_player
            entity_id: ae72001d36d56df078b321bbfbea8331
            type: is_off
        then:
          - service: media_player.volume_down
            data: {}
            target:
              entity_id: media_player.bano
            alias: Volume Down
        else:
          - service: media_player.volume_set
            target:
              entity_id: media_player.bano
            data:
              volume_level: "{{ state_attr('media_player.bano', 'volume_level') -0.03 }}"
            alias: Fine volume
    action_rotate_right:
      - if:
          - condition: device
            device_id: d966fcaa662bd9cfd919d7861b178073
            domain: media_player
            entity_id: ae72001d36d56df078b321bbfbea8331
            type: is_off
        then:
          - service: media_player.volume_up
            data: {}
            target:
              entity_id: media_player.bano
        else:
          - service: media_player.volume_set
            target:
              entity_id: media_player.bano
            data:
              volume_level: "{{ state_attr('media_player.bano', 'volume_level') +0.03 }}"
            alias: Fine volume
    action_click_short:
      - service: script.turn_on
        data: {}
        target:
          entity_id:
            - script.music_in_bano_spotcast
    action_click_double:
      - service: media_player.media_next_track
        data: {}
        target:
          entity_id:
            - media_player.bano
    rotate_left_max_loop_repeats: 60
    rotate_right_max_loop_repeats: 60
    rotate_left_loop: true
    rotate_right_loop: true
    action_click_triple:
      - service: media_player.turn_off
        data: {}
        target:
          entity_id: media_player.bano