Put multiple lamps to dim at the same level

Hi,

I would like to dim in a scene several lights to the same level.

I have the following config but I have to change all the 4 different numbers for the 4 different lights and it is a bit of a pain. I m sure there is a way to do it that is better. Here is what I have:

- id: '1607619835930'
  name: Salon Dimmed TV
  entities:
    light.hue_ambiance_spot_5_2:
      min_mireds: 153
      max_mireds: 454
      brightness: 255
      color_temp: 366
      friendly_name: Hue salon 1
      supported_features: 43
      state: 'on'
    light.hue_ambiance_spot_6_2:
      min_mireds: 153
      max_mireds: 454
      brightness: 255
      color_temp: 366
      friendly_name: Hue salon 2
      supported_features: 43
      state: 'on'
    light.hue_ambiance_spot_7_2:
      min_mireds: 153
      max_mireds: 454
      brightness: 255
      color_temp: 366
      friendly_name: Hue salon 3
      supported_features: 43
      state: 'on'
    light.hue_ambiance_spot_8_2:
      min_mireds: 153
      max_mireds: 454
      brightness: 255
      color_temp: 366
      friendly_name: Hue salon 4
      supported_features: 43
      state: 'on'

I’m presuming you’re using the ui editor?

If so it’s probably not going to like this at all, but yaml anchors will do it…

- id: '1607619835930'
  name: Salon Dimmed TV
  entities:
    light.hue_ambiance_spot_5_2: &repeat_me
      min_mireds: 153
      max_mireds: 454
      brightness: 255
      color_temp: 366
      state: 'on'
    light.hue_ambiance_spot_6_2: *repeat_me
    light.hue_ambiance_spot_7_2: *repeat_me
    light.hue_ambiance_spot_8_2: *repeat_me
1 Like

Not sure about the automations UI and YAML, but in node-red, using service calls, you can send a comma-separated list of entity IDs:

Screenshot is just one example, but you can call light.turn_on with multiple entity IDs and a single data payload as well.

He’s not calling a light service, he’s using a scene.

1 Like

You could also use a light group so that you can treat the lights as a single light.