Issue with group light

Hello

I am pretty sure that it is a noob issue but after several days of investigation, I prefer to ask question

I have created group but unfortunately it seem that these groups are not created and not recognized by HA.

I have created a dedicated groups.yaml with the following group
Preformatted text

light:   
   ############################################################
   ##                    LIGHT GROUPS                        ##
   ############################################################
  - platform: group
    name: livinroom lights
    entities:
      - light.spot
      - light.lampadaire
      - light.lumiere_cuisine

  - platform: group
    name: deskroom lights
    entities:
      - light.prise_pc

  - platform: group
    name: livingroom
    entities:
      - light.prise_tv
      - light.spot
      - light.lampadaire
      - light.lumiere_cuisine

  - platform: group
    name: Deskroom
    entities:
      - light.plafonnier
      - light.prise_pc

group:
   ############################################################
   ##                    ALL GROUPS                          ##
   ############################################################
  all_lights_livingroom:
    name: livingroom
    entities:
      - light.prise_tv
      - light.spot
      - light.lampadaire
      - light.lumiere_cuisine

  all_lights_deskroom:
    name: Deskroom
    entities:
      - light.prise_pc
      - light.Plafonnier

I have include this file in the configuration.yaml
Preformatted text

group: !include /config/groups/groups.yaml

At the end, I have to following issue if I check the config

Invalid config for [group]: extra keys not allowed @ data['group']['group']['all_lights_deskroom']. Got OrderedDict([('name', 'Deskroom'), ('entities', ['light.prise_pc', 'light.Plafonnier'])])
extra keys not allowed @ data['group']['group']['all_lights_livingroom']. Got OrderedDict([('name', 'livingroom'), ('entities', ['light.prise_tv', 'light.spot', 'light.lampadaire', 'light.lumiere_cuisine'])])
value should be a string for dictionary value @ data['group']['automation']['entities']. Got None
value should be a string for dictionary value @ data['group']['light']['entities']. Got None
value should be a string for dictionary value @ data['group']['sensor']['entities']. Got None. (See /config/configuration.yaml, line 31).

Thank you a lot for your help !

Light groups subject to domain light, so I think that you cannot use group:

1 Like

Separate that light section into a separate file or inside configuration.yaml. It should not be in groups.yaml. Also, inside group.yaml, do not include the word group. That’s already defined when you call out the include.

Thanx for your answer.

I tried separate them into 3 files, but unfortunately, it did not work.

I have completely reviewed my files structure to keep it simple and it resolves the issue.

The light is now in a package file dedicated to the light (light, group ans sensor).
I think all issues were du several package declaration (i don’t know why…)

Thank you for your help