lidans5
(lior)
November 26, 2021, 11:46am
1
how do I nest these group to one main group: first floor, is it possible? (i’m using groups.yaml)
dining_room_lights:
name: dining room lights
entities:
- light.dinnig_table
- switch.sopha_light_2
kitchen_lights:
name: kitchen_lights
- switch.kitchen_ceiling
- light.left_led_level_on_off
- light.kitchen_island
tom_l
November 26, 2021, 12:17pm
2
Yes it is possible.
group:
first_floor:
name: First Floor Lights
entities:
- group.dining_room_lights
- group.kitchen_lights
However, if you turn your switches sopha_light_2
and kitchen_ceiling
into new light entities you can use light groups instead.
That way you retain control of brightness and colour. Not just on/off as with “normal” groups.
However these only work with lights. Hence the need to turn your switches into lights first.
light: ### <--- NOTE light not group
- platform: switch # new light entity created from switch
name: Sopha Light
entity_id: switch.sopha_light_2
- platform: switch # new light created from switch
name: Kitchen Ceiling
entity_id: switch.kitchen_ceiling
light:
- platform: group
name: Kitchen Lights # new light (group)
entities:
- light.kitchen_ceiling
- light.left_led_level_on_off
- light.kitchen_island
- platform: group
name: Dining Room Lights #new light (group)
entities:
- light.dinnig_table
- light.sopha_light_2
- platform: group # new light (group)
name: First Floor Lights
entities:
- light.kitchen_lights
- light.dining_room_lights
1 Like
lidans5
(lior)
November 26, 2021, 12:26pm
3
hi, thx
I get this message: Invalid config for [group]: Entity ID group.working.room.lights is an invalid entity ID for dictionary value @ data[‘group’][‘first_floor’][‘entities’]. Got [‘group.working.room.lights’, ‘group.dining.room.lights’, ‘group.kitchen.lights’, ‘group.outside.lights’, ‘group.living.room.lights’]. (See /config/configuration.yaml, line 8).
tom_l
November 26, 2021, 12:27pm
4
You put it in the wrong place, even though I said this:
Look at the first line of the config I posted.
1 Like
lidans5
(lior)
November 26, 2021, 12:33pm
5
thx again
I have all the lines ant the coniguration.yaml
ight:
platform: switch
name: main working room light
entity_id: switch.working_room
name: working room bath mirror light
entity_id: switch.working_bathroom
and more, they are working great
I got the above message after adding the first floor group (which i’m adding at the groups.yaml)
what am I doing wrong ?
tom_l
November 26, 2021, 12:35pm
6
Could you please have a read of point 11 here, How to help us help you - or How to ask a good question
Then post the correctly formatted configuration you are trying to use.
1 Like
lidans5
(lior)
November 26, 2021, 12:42pm
7
ok, sorry, thank you for your patience
groups.yaml:
outside_lights:
name: outside_lights
entities:
- switch.deck_2
- switch.deck
- light.west_wall_467dccfe_on_off
first_floor_lights:
name: first floor lights
entities:
- group.outside.lights
- group.working.room.lights
- group.dining.room.lights
- group.kitchen.lights
- group.living.room.lights
configuration.yaml:
light:
- platform: switch
name: main working room light
entity_id: switch.working_room
name: working room bath mirror light
entity_id: switch.working_bathroom
didn’t post all the yaml just an example, but the error I get is when I’m adding the above first_floor_lights…
tom_l
November 26, 2021, 12:56pm
8
Thanks.
If you are going to use plain groups instead of light groups you don’t need the light_switch integration.
lidans5
(lior)
November 26, 2021, 1:00pm
9
i’m going to use both
the original post was about nesting the groups, and in the mean time I can’t solve it
tom_l
November 26, 2021, 1:10pm
10
This should work:
group:
dining_room_lights:
name: dining room lights
entities:
- light.dinnig_table
- switch.sopha_light_2
kitchen_lights:
name: kitchen_lights
entities:
- switch.kitchen_ceiling
- light.left_led_level_on_off
- light.kitchen_island
first_floor:
name: First Floor Lights
entities:
- group.dining_room_lights
- group.kitchen_lights
Dont use group:
at the top of the file if you are using a group.yaml file though. Just put this in the file:
dining_room_lights:
name: dining room lights
entities:
- light.dinnig_table
- switch.sopha_light_2
kitchen_lights:
name: kitchen_lights
entities:
- switch.kitchen_ceiling
- light.left_led_level_on_off
- light.kitchen_island
first_floor:
name: First Floor Lights
entities:
- group.dining_room_lights
- group.kitchen_lights
lidans5
(lior)
November 26, 2021, 1:14pm
11
Thank you @tom_l !!! works like a charm
1 Like