How to group sonoff switches by room

Respectfully, how much of the documentation have you read? I’m asking because the mistakes you are making suggest you have not reviewed the basics of Home Assistant. I recommend, at an absolute bare minimum, to read this section if you intend to modify anything in YAML:

The reason why it refused to create the groups is because there are several basic YAML syntax errors. After it failed to produce the groups, did you check Configuration > Logs? It undoubtedly contains error messages.

  • Don’t capitalize key names (like OUTSIDE and DINING and Kitchen_Sox).
  • Don’t duplicate key names (for Home Assistant there’s no difference between Dining and DINING).
  • Be consistent with indentation (sometimes you use 2 spaces, sometimes 4).
  • An entity_id is always in lowercase (never uppercase or titlecase like this group.Old_Den_Extra).

After you fix all of the YAML mistakes, execute Configuration > Server Controls > Reload Groups and then check Logs to ensure no new errors are reported.

Screenshot from 2021-09-12 19-56-05

ok truthfully i didnt read much. Ive seen some videos and stuff. Normally i only do the server controls * check config, I dont go to the logs. So i fixed everything and checked the logs. The only thing that keeps coming up is this:

2021-09-12 17:33:33 ERROR (MainThread) [homeassistant.components.group] Entity id already exists - ignoring: group.dining

but im not sure why, here is the code snippet:

The groups are showing up, but now i just need to hide the individual entities, so for example, Outside Group contains Patio Sockets and Garage so I get a card view for those 2 entities in there. But I still see the Garage T3 and the Patio Sockets:

Screen Shot 2021-09-12 at 6.29.59 PM

btw, thanks for all the help!

Where’s the ‘code snippet’?

Somewhere in your group configuration there are duplicated group.dining.

it must have been an old log line before i made the modifications.

ok so the only thing left is to hide the individual entities and just leave the groups with those entities inside. Is this possible. Ive been reading the hidden feature is no longer available.

As explained previously, you won’t be able to do that with the automatically generated Lovelace dashboard. … unless you take control of it and add/remove/modify the cards to suit your preferences. In addition, your original goal cannot be achieved using standard Lovelace cards:

have 1 card show up called SOCKETS and when you click on it, it takes you to a screen where you can see the individual cards inside

ok thanks. im not sure about making my own dashboard. it seemed kinda complicated. Is there a way to order the cards such that the group cards show up first in the current dashboard?

Only if you take control of the automatically generated Lovelace dashboard or create a new dashboard.

If you choose to take control of it, the cards can be re-ordered. However, if you add new entities they will no longer be automatically added to the dashboard, and you will need to add them manually (that’s a consequence of “taking control”).

true, i read about that. so im looking into creating a dashboard again. if i manage to do so, and i DO add a new entity in the future, and creating that new dashboard is simple, i could just erase my old one and have HA add the new entities once back in the default dashboard, and then create the new dashboard with the automatically added entity…dunno if that was clear or confusing:

  1. today - all my entities are there
  2. today - create new dashboard
  3. tomorrow - i buy a new device
  4. tomorrow - i delete my custom dashboard (reverting to default & HA adds new device automatically)
  5. tomorrow - re-create my new custom dashboard which should contain the new device/entity

Ok before proceeding to create the dashboard, I wanted to create a couple of scenes but i noticed that is gone. Scenes have been removed from the visual editor. Is there an equivalent?

They have not been removed from the visual editor. I’m using Home Assistant 2021.09.6 and I can see the menu command (Configuration > Scenes > Add Scene). If you don’t have that command, it implies there may be an issue with the configuration of your instance of Home Assistant. However, that’s a completely separate topic (as are about Lovelace dashboards) from this topic’s original question which was how to create groups of switches.

It’s preferable to keep a topic focused on one issue as opposed to covering a broad spectrum of Home Assistant’s features. If you have questions about dashboards, scenes, etc then start separate topics to discuss them.

agreed! thx for all the help.

1 Like

You’re welcome!

Please consider marking my post above with the Solution tag. It will automatically place a check-mark next to the topic’s title which signals to other users that this topic is resolved. This helps other users find answers to similar questions. For more information, refer to guideline 21 in the FAQ.