Dimming multiple Tradfri Leds

I recently bought some Tradfri Leds that are able to dim and change white colors.
They are installed in the same lamp.
Now i try to find a way to simultaniously dim them and change the color.
Im new to HA so my knowledge is a bit limited.
What is the simplest way to do that?
I was able to switch them on or off with a script that contains them. But this was not possible for dimming or color change.
Thanks for your help! :wink:

If on Tradfri gateway - just create the light group (group ligts into single light entity that can be controlled as one).
If using other ZigBee solution (like Conbee stick + deconz) there should be light group automatically created within deconz to to the same. Again this will act as single light entity.

I use a cc2531 USB stick with ZigBee2MQTT. No Tradfri Gateway.
So i have to use the internal functions of HA.

Another option is to add a line at the end into configuration.yaml:
group: !include groups.yaml

And then add the file groups.yaml at the same level as the file automation.yaml, with content like:

living_room_lights:
  name: Woonkamer
  entities:
  - light.computer_1
  - light.computer_2
  - light.computer_3
  - light.staande_lamp_1
  - light.staande_lamp_2
  - switch.staande_lamp_3

kitchen_lights:
  name: Keuken
  entities:
  - light.keuken_1
  - light.keuken_2
  - light.keuken_3

With this method you can combine e.g. lights with switches.

2 Likes

Thanks a lot.
Will try that out today. :slight_smile:

Zigbee2mqtt has support for Zigbee groups. By using Zigbee groups you can control multiple devices simultaneously with one command.

2 Likes

Works! Thanks a lot!
But another question on this topic.
Is it possible to use these Lovelace buttons for the group too?
2020-06-22 13_03_21-192.168.1.1 - Remotedesktopverbindung

Did you create a HA group, a HA light group or a zigbee2mqtt group ?

I used a HA light group in the groups.yaml.

I think for that to work you will need to create a light-group in configuration.yaml.

Now you have created an entity that starts with group.something.
When you create a light-group, I would assume it starts with light.group_something_... which you can enter as entry on a lovelace card.
But, maybe the lovelace card can accept a group.something as entry? Just try it.

1 Like

Works now. Thanks a lot for Your help guys.
I did everything right, with your advices.
But strange enough, the light group was not displayed until i restarted HA.

That’s normal, any changes you make to an existing file will only become active after a restart of HA Core.

1 Like

Didnt know that. But thanks again. :wink:

Okay guys, another question.
Now i try to add a second light group.
But the syntax drives me crazy. I tried this in the configuration.yaml, and i get an error “duplicated mappy key…”

# Gruppe Wohnzimmerlampe
light:
  - platform: group
    name: Wohnzimmerlampe
    entities:
    - light.0x680ae2fffe6e885e_light
    - light.0x680ae2fffe6e8681_light

# Gruppe Schlafzimmerlampe 1
light:
  - platform: group
    name: Schlafzimmerlampe 1
    entities:
    - light.schlafzimmerlampe_led1_light
    - light.schlafzimmerlampe_led2_light

The error points to the second “light” entry.

Please format your code correct.

https://community.home-assistant.io/t/how-to-help-us-help-you-or-how-to-ask-a-good-question/114371/4

Especially point 11

1 Like

Sorry, corrected.
The first group works. But not the second.

I think you need to remove the second

light:
1 Like

Thanks again Francis. That was the solution. :wink: