Newbie Light Group not working

Hi All - I really hope somebody can help me…
I am new to HA and pretty new to programming.

I want to group 5 lights above a dining table into a light group - they are dimmable and you can change the white tone…
Research shows that Light Group is my best option.
I have tried 2 methods to program using file editor:
Directly in configuration.yaml and in a new file called Light_Groups.yaml. content is the same - i reboot the server but I am getting no new entity - can anybody check if I am doing something wrong?

light:

  • platform: group
    name: “Dining Table Lights”
    entities:
    • light.dining_room_table_1
    • light.dining_room_table_3
    • light.dining_room_table_3
    • light.dining_room_table_4
    • light.dining_room_table_5

automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

The second suggestion in a separate file will not work, however the first one should.

It’s case sensitive, it should be light: not Light:.

Hi Burningstone thank you - yes, I saw that and changed it - still no entity :frowning:

I am getting an error message in the logs: “component error:Light - Integration ‘Light’ not found”
Screenshot 2020-10-06 130209

Did you restart after the change? Because the error says that it’s still uppercase. Can you show the whole code again please? And please highlight the code and press the button </> at the top here in the forum.

Remove this line completely…

Light Group: !include Light_groups.yaml

Then paste this directly into your configuration.yaml with the first line aligned completely to the left of the page, and preserving the indentation of the lines below exactly.

light:
  - platform: group
    name: “Dining Table Lights”
    entities:
      - light.dining_room_table_1
      - light.dining_room_table_3
      - light.dining_room_table_3
      - light.dining_room_table_4
      - light.dining_room_table_5

Run a configuration check to ensure there are no errors and restart homeassistant.

1 Like

WOW - fantastic thanks to both of you for such a quick turnaround! - working perfectly now.

1 Like

I know this is an old thread, but posting this for future references :slight_smile:

The problem was in the capitalization, the correct form is:

light groups: light_groups.yaml

I think it might help to add a little more here for those new…
Read through this article:

For those in a hurry, scroll down to Nesting !includes.

I’m going to place those examples here as well:

light:
- platform: group
  name: "Bedside Lights"
  entities:
    - light.left_bedside_light
    - light.right_bedside_light

# define more light groups in a separate file
light groups: !include light-groups.yaml

# define some light switch mappings in a different file
light switches: !include light-switches.yaml

The above snippet, is directly in our configuration.yaml file. Please note the light in front of the groups part where we bring switches and groups in. That is important, because that means our next YAML files should not have a “light” object in them, but in fact, everything inside of them should be 1 level lower.

light.yaml would look something like this:

- platform: group
  name: "Outside Lights"
  entities:
    - light.porch_lights
    - light.patio_lights

and switches.yaml something like this:

- platform: switch
  name: "Patio Lights"
  entity_id: switch.patio_lights

- platform: switch
  name: "Floor Lamp"
  entity_id: switch.floor_lamp_plug

I’m going to ignore the other pieces, please refer to the link above for the rest as copying and pasting all the instructions is pointless. :slight_smile:

Enjoy!

2 Likes