Take a look at your log and you probably will be able to see an error message related to this, which might give you some directions.
Anyway, this configuration you shared is not on group integration, so it should be outside your groups.yaml file, but under sensor on your configuration.yaml (or some of your packages files).
Like this:
light:
- platform: group
unique_id: lightgroup_moon
name: IKEA Mond
icon: mdi:lightbulb
entities:
- light.ikea_mond_1
- light.ikea_mond_2
By the way, I’m not sure a “.” is valid for unique_id. Just in case I would try to replace this:
thanks for the answer. Replacing lightgroup. moon with lightgroup_moon, does not help. The group is not visible in HA. When I enter lightgroups through the UI, they are defined as helpers. I have no idea how to split the different lightgroups into separate yaml files. If there is a way to do this, please let me know.
and btw: this is also nit working:
sensor:
- platform: group
unique_id: lightgroup_moon
name: IKEA Mond
icon: mdi:lightbulb
entities:
- light.ikea_mond_1
- light.ikea_mond_2
“Package group setup failed. Component group cannot be merged. Expected a dict.”
I only have one line inthe configuartion.yaml: packages: !include_dir_named integrations
In group.yaml I will load the different groups with: group: !include_dir_merge_named ../groups
So something is wrong with my setup in the configuration.yaml and the group.yaml. I am confused now!
i do this in order not to loose the overview. I have all my automations, entities, etc. in a folder structure. This works fine for everything, except groups.
New style of groups
Those will create entities from the same type of the child entities, but then you can ox mix types. A light group will be like light.lightgroup_moon and will behave like a light, so you will be able to set brightness, etc.
Those groups can easily be created by the UI like announced here: 2022.4: Groups! Groups! Groups! - Home Assistant
If you don’t want to use the UI, you can set it into your configuration.yaml (or in any package file, but not into the groups.yaml file you referenced above) like this:
light:
- platform: group
unique_id: lightgroup_moon
name: IKEA Mond
icon: mdi:lightbulb
entities:
- light.ikea_mond_1
- light.ikea_mond_2
You can do that, but you have to understand a light group is different of a group with lights…
On groups.yaml you will create groups, which means entities named group.xxx. The format you used in your original post is incorrect, as that is the way of creating a light group (light.xxx) and cannot be inside groups.yaml.
So, in your package folder, create a file name lights.yaml with this content:
light:
- platform: group
unique_id: lightgroup_moon
name: IKEA Mond
icon: mdi:lightbulb
entities:
- light.ikea_mond_1
- light.ikea_mond_2
And you can also use !include_dir_list ../lights in the same way, but it is important to understand that you very first post on this thread is a yaml to create a light, not to create a group, so it have to be under light: and not under group:.
ok, I think I have it! Groups and light-groups are different.
I changed the code in this way and HA did not report an error. But how can I access the Light-group now? There is nothing I can see in HA?
My expectation was, that I have a entity (or whatever) wich I can control? Where can I find the group “IKEA Mond” ?