Issue creating multiple groups

I am trying to define groups using .yaml
Here’s my configuration:

default_config:

# Load frontend themes from the themes folder
frontend:
  themes: !include_dir_merge_named themes

# Setup logging
logger:
  default: warning
  logs:
    homeassistant.components.cover: debug
    homeassistant.components.input_number: debug
    homeassistant.components.script: debug

automation: !include automations.yaml
input_number: !include input_numbers.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
cover: 
  - !include covers.yaml
  - !include cover_groups.yaml

And here’s my cover_groups.yaml:

platform: group
name: All Blinds
unique_id: "0e28dab6-17cf-436c-8b4f-a73dc68654ba"
entities:
  - cover.blind1
  - cover.blind2
  - cover.blind3

Works fine, but I want to make more groups than just this “All Blinds”.
The issue is that I don’t know the syntax to make multiple.

I tried this:

- platform: group
  name: Group 1
  unique_id: "id1"
  entities:
    - cover.x

- platform: group
  name: Group 2
  unique_id: "id2"
  entities:
    - cover.y

But i get:

Configuration warnings
Invalid config for ‘cover’ at configuration.yaml, line 22: expected a dictionary ‘’, got [{‘platform’: ‘group’, ‘name’: ‘Group 1’, ‘unique_id’: ‘id1’, ‘entities’: [‘cover.x’]}, {‘platform’: ‘group’, ‘name’: ‘Group 2’, ‘unique_id’: ‘id2’, ‘entities’: [‘cover.y’]}]

And the documentation seems to only show syntax for 1 group.

Am I missing something?

And with this ?

gp1blind:
    - platform: group
      name: Group 1
      unique_id: "id1"
      entities:
        - cover.x
gp2blind:
   - platform: group
     name: Group 2
     unique_id: "id2"
     entities:
        - cover.y

allblind:
   - platform: group
     name: All Blinds
     unique_id: "0e28dab6-17cf-436c-8b4f-a73dc68654ba"
     entities:
       - cover.blind1
       - cover.blind2
       - cover.blind3

Thank you for responding! :smiley:

I tried that as well and got this:

Configuration warnings
Invalid config for ‘cover’ at configuration.yaml, line 22: required key ‘platform’ not provided

The issue is with your include.

Make a covers folder, add as many files as you want.

cover: !include_dir_merge_list covers

Then inside your config\covers folder, make 2 files covers.yaml and cover_groups.yaml

- platform: group
  name: Group 1
  unique_id: "id1"
  entities:
    - cover.x

- platform: group
  name: Group 2
  unique_id: "id2"
  entities:
    - cover.y

They need to be listed, i.e. you need a - in front of every config.

1 Like