i have many sonoff light switches & wall sockets that Im trying to group with configuration and groups.yaml. So far I took a triple Sonoff light switch T3C, and followed this video here (Groups in Home Assistant explained - How to control multiple entities - YouTube).
I added all sonoff lights and wall sockets to my groups.yaml file like this where the first 15 items are wall sockets and the last ones with _x format are single, double and triple lights like T1, T2 and T3:
lights:
name: Lites & Sw
icon: mdi:motion-sensor
entities:
- switch.sonoff_100064b24a
- switch.sonoff_100064b2ee
- switch.sonoff_100064ca09
- switch.sonoff_10008c0dab
- switch.sonoff_1000aa7e4c
- switch.sonoff_1000b84968
- switch.sonoff_1000cf982b
- switch.sonoff_1000cf9964
- switch.sonoff_1000cf996a
- switch.sonoff_1000cf9994
- switch.sonoff_1000cf9a8b
- switch.sonoff_1000cf9c0f
- switch.sonoff_1000cf9c2e
- switch.sonoff_1000cf9c6a
- switch.sonoff_1000cf9fbb
- switch.sonoff_100064ccb7_1
- switch.sonoff_100064ccb7_2
- switch.sonoff_100064e8be_1
- switch.sonoff_100064e8be_2
- switch.sonoff_100064f82c_1
- switch.sonoff_100064f82c_2
- switch.sonoff_100064f82c_3
- switch.sonoff_1000650c18_1
- switch.sonoff_1000650c18_2
- switch.sonoff_1000650c18_3
- switch.sonoff_10007d355e_1
- switch.sonoff_10007d355e_2
- switch.sonoff_10007ebeee_1
- switch.sonoff_10007ebeee_2
- switch.sonoff_10007ebeee_3
- switch.sonoff_10007ec067_1
- switch.sonoff_10007ec067_2
- switch.sonoff_10007ec067_3
- switch.sonoff_10007ece5a_1
- switch.sonoff_10007ece5a_2
- switch.sonoff_10007ece5a_3
- switch.sonoff_10007ecf09_1
- switch.sonoff_10007ecf09_2
- switch.sonoff_10007ecf09_3
- switch.sonoff_10007ee105_1
- switch.sonoff_10007ee105_2
- switch.sonoff_10007ee316_1
- switch.sonoff_10007ee316_2
- switch.sonoff_1000a83860_1
- switch.sonoff_1000a83860_2
- switch.sonoff_1000a83860_3
And then in configuration.yaml I did this:
#LIGHTS CONFIG HOME
light:
# Convert Sw to Lites
- platform: switch
name: Studio1
entity_id: switch.sonoff_1000a83860_1
- platform: switch
name: Studio2
entity_id: switch.sonoff_1000a83860_2
- platform: switch
name: Studio3f
entity_id: switch.sonoff_1000a83860_3
# Light Groups
- platform: group
name: Studio Lights
entities:
- switch.sonoff_1000a83860_1
- switch.sonoff_1000a83860_2
- platform: group
name: Studio Fan
entities:
- switch.sonoff_1000a83860_3
But I get this error when checking configuration:
Invalid config for [group]: string value is None for dictionary value @ data['group']['lights']['entities']. Got ['switch.sonoff_100064b24a', 'switch.sonoff_100064b2ee', 'switch.sonoff_100064ca09', 'switch.sonoff_10008c0dab', 'switch.sonoff_1000aa7e4c', 'switch.sonoff_1000b84968', 'switch.sonoff_1000cf982b', 'switch.sonoff_1000cf9964', 'switch.sonoff_1000cf996a', 'switch.sonoff_1000cf9994', 'switch.sonoff_1000cf9a8b', 'switch.sonoff_1000cf9c0f', 'switch.sonoff_1000cf9c2e', 'switch.sonoff_1000cf9c6a', 'switch.sonoff_1000cf9fbb', 'switch.sonoff_100064ccb7_1', 'switch.sonoff_100064ccb7_2', 'switch.sonoff_1.... (See /config/configuration.yaml, line 138).
Invalid config for [light.group]: Entity ID 'switch.sonoff_1000a83860_1' does not belong to domain 'light' for dictionary value @ data['entities']. Got ['switch.sonoff_1000a83860_1', 'switch.sonoff_1000a83860_2']. (See ?, line ?).
Invalid config for [light.group]: Entity ID 'switch.sonoff_1000a83860_3' does not belong to domain 'light' for dictionary value @ data['entities']. Got ['switch.sonoff_1000a83860_3']. (See ?, line ?).
What did I miss?