Dim (and brighten) multiple lights with a remote

I took Dim (and brighten) lights via a remote example and modified it so that it can be used for multiple lights.

Operation is simple: by long pressing the button, normally assigned to toggle the light, it will be brightened in intervals until it reaches maximum brightness, then it will dim it to minimum brightness and so on until the button is released. I use it with IKEA on/off zigbee remote but in my configuration a single remote controls 2 smart bulbs instead of 1.

Full configuration:

1 Like

Didn’t know we could trigger a deconz event this way. I always use the event id’s but this seems not necessary this way.

This is created automatically through the automation editor. I think you can’t easily find the device id to do the same in manual automations. Anyway I think the “normal” way is more readable.

I make automations with deconz like this (event id’s are pretty easy to find though)

- alias: 'Livingroom Philips button 2 tap_action'
  initial_state: 'on'
  trigger:
    platform: event
    event_type: deconz_event
    event_data:
      id: ab_woonkamer_muur
      event: 2002
  action:
    - service: light.turn_on
      data_template:
        entity_id: light.woonkamer
        brightness: >
          {% set bri = state_attr('light.woonkamer', 'brightness') | int %}
          {{ [bri+30, 249] | min }}

but your method sounds cool to experiment with, thanks

1 Like

It’s not my method, I just commented :slightly_smiling_face: *goes on preparing for HKI