Lovelace: Group card

Group card

Source: https://github.com/ciotlosm/custom-lovelace/tree/master/group-card

Is a simple card that expands a group to a list of entities to be used with entities, glance, etc. Some people still wanted to reuse their automation groups to show them on the UI without redoing things.

:warning: Keep in mind that you can use this with any cards that take as parameter entities array (like glance, entitites, etc.).

Options

Name Type Default Description
type string Required custom:group-card
card object Required Card object
group string Required The entity_id of a group

Card object

Name Type Default Description
type string Required A type of card (ex.glance) from lovelace
title object optional Title of the card
other optional Other parameters supported by card type above

Examples

Show all with some exceptions:

- type: custom:group-card
  card:
    type: entities
    title: Group card
  group: group.bedroom

FAQ: https://github.com/ciotlosm/custom-lovelace#faq

Buy Me A Coffee if you like the cards so much that wish to express your gratitude.

8 Likes

Group card (I think you forgot the link to the actual card?)

1 Like

You are right :frowning:

Thanks!

Is there some way to get this to work with the light card?

I get the following:
2018-12-07 10:22:33 ERROR (MainThread) [frontend.js.latest.201812050] https://REDACTED/frontend_latest/4a0b71976892b9590a9c.chunk.js:4818:651 Uncaught Error: Specify an entity from within the light domain.

The included group is entirely lights :slight_smile:

This card is awesome!! Makes it easy to bring some old groups across to Lovelace while I try and work out what I want to do and how to lay it all out.

Thanks!!!

Hi
I this cards works fine with single groups, but I can’t get it work with a group with groups inside.
For example, every room is a group, additional I have a group for every floor. Also my house is a group with all floor groups inside.
I want to configurate a entity-filter for every floor and for the whole house, so that I can see if a window or a switch is on/open.
If I configurate it like this, lovelace crash.

did you ever get this figured out? same issue…

Use individual entities for your floor/whole house groups, not groups ex: "first floor: (entity 1)(entity 2) etc…
much harder but it will work that way.

Sorry, i don’t get it.
The Thing is, that a group for example is a room with entities inside.
Many rooms are a floor, so the floor group is a group of room groups.
Many floors are a house, so the house group is a group of floor groups.
In the end I just need to Change the entities of a room and the floors and house is updated.

Problem: doesn’t recognize group with groups inside
Solution: Dont make them.

Instead just name all individual entities you wish to include in the floor and house groups.

Before: group.floor1 = group.kitchen, group.bedroom, group.office
After: group.floor1 = light.kitchen_lights, light.bedroom, switch.office_fan, … and so on

Your not a programmer, aren’t you?
Because this is the first lesson a programmer learns, if part of a code is entered multiple times, then put it in a method.
Even in the official docs of home assistant (Groups) the first thing you see are groups inside a group.
Why would they explain it that way, when you should not use it?

Because it predates Lovelace and that’s not the lovelace way. Lovelace is the default in 0.86

Yeah I know that it doesn’t work right now, so I asked to make it possible.
Otherwise it would be a major step back!

I dunno… it’s a storm in a teacup… I still have a couple of groups so for instance I can group some automations together to enable/disable as a group bu they are decoupling the front-end display from the back-end. How many times do you plan on adding an entity to lovelace? It’s almost 95% or the time do it once done forever… Or cut and paste…

Right now, I work with the group card. So I normally don’t add any entity to lovelance (except cameras or valves).
That’s the great thing with this card!
In the last couple of weeks, some smart plugs, sensors, cameras, arrived and I had to add new entitys all the time.
But as said, I add them to groups and lovelance is updated automatically.

For example I have a card with all rooms of a floor, and I have a card for every room.
I use have the group card for switches in the floor and in the room.
When I add a switch, I only have to add it to the group and both cards are updated.
Totally simple! :slight_smile:

I was just about to ask how to remove the header_toggle, but I figured it out:

type: 'custom:group-card'
card:
  type: entities
  title: All Automations
  show_header_toggle: false
group: group.all_automations

to me the nice thing about this it lets me put the same group multiple places without having to duplicate the entries. For example think of a header with time/date at the top of each page. I can put the entities in a group and then just put the group on each page. Adding new things, like /outside temp/outside weather (sunny, cloudy, rainy, etc) is as simple as adding them to the group then they show up on every page. Also, I have an upstairs bathroom, I also have views setup for every bedroom upstairs. I have the bathroom duplicated on each room view. It would be nice if that were a group that could be included on each page. Saves on the typing.

what do you mean?
im solving your problem lol

Did this fix your problem?

I particularly like combining this with the Entity Filter card, for example to view all people that are home without having to put everyone of them in the configuration.

type: 'custom:group-card'
card:
  type: entity-filter
  state_filter:
    - home
  card:
    type: glance
    title: Devices at home
group: group.all_devices
2 Likes