I have been trying to group lights in a groups.yaml forever, and it never works. Banging my head against the wall, and I’m sure its something dumb.
Here is my configuration.yaml:
# Includes
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
sensor: !include sensor.yaml
switch: !include switch.yaml
Here is my groups.yaml:
group:
name: Kitchen Lights
view: no
entities:
- light.kitchen_cans
- light.kitchen_table_light
- light.under_cabinet
This is the error I get when checking my config:
Invalid config for [group]: [view] is an invalid option for [group]. Check: group->group->group->view. (See /config/configuration.yaml, line 20).
I am just trying to group lights together in various rooms to make scene creation easier.
Please help!!!
1 Like
tom_l
March 16, 2021, 5:29am
2
Remove this:
skiman384:
view: no
Also consider using the light group platform as it will give you better control and frontend display for your light group. If you do decide to use it, this goes under light:
not group:
Would the light group also go in the groups.yaml, or should I create its own yaml file?
Also, how would I do multiple light groups in one yaml file?
tom_l
March 16, 2021, 5:58am
4
If you are using the dedicated Light Group platform
From the docs linked above (slightly edited):
Put this in your lights.yaml
file:
- platform: group
name: Kitchen Lights
entities:
- light.kitchen_ceiling_lights
- light.kitchen_under_cabinet_lights
- light.kitchen_spot_lights
- light.pendant_lights
- platform: group
name: Den Lights
entities:
- light.den_ceiling_lights
- light.den_under_cabinet_lights
If you don’t have a lights.yaml
file you will have to create it and move all your light s to it. then put this in your configuration.yaml file:
light: !include lights.yaml
2 Likes