Can someone help me bind a dimmer to light?

priviet comrades, me have this zigbee dimmer:
https://www.aliexpress.com/item/1005005638641546.html?spm=a2g0o.order_list.order_list_main.11.1ae81802Kt6o52

i have it set up in z2m, and i also have a group of zigbee lights. i can turn them on and off but i can’t manage to make an automation to change the brightness, all i could find is how to do it with a button press not a knob. if you can post an example of such automation i will grant you with many wishes and prayers for your kind soul.

Do you have a light hard wired to the switch aswell?

Can you check what the dimmer exposes under developer tools /states and then lookup the button and post a screen shot.

thank you for the help, i don’t have a light wired to the device.
i just want to use logicly (is it the right word?), anyway the dimmer entity is called indicator_mode it has a brightness state it goes from 0 to 254 (in the image it’s set to 110).

This should work:

alias: example_use_light_to_trigger_other_light
description: ""
trigger:
  - platform: state
    entity_id:
      - light.0_keu_lmp_spot_1 (add your dimmer here so "select.roni_dimmer_indicator_mode")
    attribute: brightness
condition: []
action:
  - service: light.turn_on
    metadata: {}
    data:
      brightness: |
        {{ state_attr('light.0_keu_lmp_spot_1','brightness') }} 
    target:
      entity_id: 
        - light.0_keu_lmp_waskastspot_links (add the device id you want to controll here)
mode: single

Im treating your dimmer as a light, if it changes from brightness, set the lights you want on to the brightness you want.

You could add an if statement like this, so the light will just turn off if you request les then 10 brightness:

alias: example_use_light_to_trigger_other_light
description: ""
trigger:
  - platform: state
    entity_id:
      - light.0_keu_lmp_spot_1
    attribute: brightness
condition: []
action:
  - if:
      - condition: template
        value_template: "{{ state_attr('light.0_keu_lmp_spot_1','brightness') > 10 }}"
    then:
      - service: light.turn_on
        metadata: {}
        data:
          brightness: |
            {{ state_attr('light.0_keu_lmp_spot_1','brightness') }} 
        target:
          entity_id:
            - light.0_keu_lmp_waskastspot_links
    else:
      - service: light.turn_off
        metadata: {}
        data: {}
        target:
          entity_id:
            - light.0_keu_lmp_waskastspot_links
mode: single


1 Like

it worked! thank you very much @Floppymonster May your house be free from tigers and May your success be inevitable.

1 Like