there are two basic things for groups:it needs to be defined and needs to have members (well technically a group can exist with zero members, but then what is the point)
a group needs to be defined
does exactly that, it defines a group with the name “All” (without quotes of course)
You need to assign items to a group, ie., you make items a member of one or more groups. In your examples the Switch “Corner” is part of the group “livingroom”, which in turn needs to be defined by the syntax under above somewhere.
Groups can then be nested, in other words your can have groups become members of other groups, for example
Group Lights (All)
defines a group “All” that includes every item from group "Lights"
Keep in mind that items can belong to more than one group
There is more in the forum regarding all kinds of aspects of groups, but one of my all time favorite entry is:
If you are trying to get you head around these things, check out the tutorials section in the forum or just search for ‘design patterns’;
Personally, I have little experience with what you are doing, I use the design pattern (link provieded earlier), but a quick search on the forum brought up a few discussions that look like they may help you:
Just two of the threads that came up when I searched for “switching groups”