Trying to create an automation to dim lights via conbee2

Hi all,

i’m trying to get a light to dim when I press an ikea wireless dimmer switch but I’ve no idea how to do it.

currently I’m using the automation from the instructions

- id: '0000000000030'
  alias: Decrease brightness of Robins bedside light with dimmer
  initial_state: 'true'
  trigger:
    platform: event
    event_type: deconz_event
    event_data:
      id: robins_dimmer
      event: 3002
  action:
    - service: light.turn_on
      data_template:
        entity_id: light.bedside_1
        brightness: >
          {% set bri = state_attr('light.bedside_1', 'brightness') | int %}
          {{ [bri-30, 0] | max }}

the problem with this is that I have to keep pressing the button or turning the dial, stop, turn the dial… what I’d like to do is have the light increase/decrease in brightness until I release the button, or stop turning the dial.

is this possible? and could someone help me to understand how?

thank you all for your time and help

kind regards

Robin

Look around here on the forum. Can’t remember where exactly but not too long ago.

Someone found out that if you can couple the lights in deconz with a dimming remote, you can ‘mimic’ the commands from the remote instead of trying to steer the lights on your own.

Quite ingenious that one!

I’m in the same boat as you.

The problem with the dimmer withing Deconz is that for some reason even when you group lights together, when you turn on the light, it would turn one light on, and when you press on again the second light will turn on. and similarly with dimming or turning off, you need to do the action once to turn one off and again to turn the other one off…

and on top of that, maybe you want to use the switch for a device not connected to deconz, like a lifx, then you will need to do automation in HA. provides more flexibility, and deconz is purely to bring the devices into HA for automation.