Lovelace lights group control

I have some groups of lights i want to control at once, to set color or brightness of multiple lights at once. How can i do this in Lovelace? Currently it does not support groups?

2 Likes

Make a light group. The interface wouldn’t handle that anyways. The interface is about adding your existing objects in a nice and orderly fashion. It does not do automations.

Once you have your light group, add that object to the lovelace interface.

3 Likes

Ah Thanks, that works… Unfortunately it’s no longer possible to click on the title of a entities group to do the same… Wil this be fixed / added?

That’s possible, but you’ll never get the brightness unless you make a light group. Normal HA is that way too.

If you place all your objects into an entity card, there is an option to turn on overall control for it.

show_header_toggle: true

EDIT: Actually, this is on by default, so you don’t even need to add it. Have you tried making your group?

1 Like

I still don’t get it. This is a light group in lovelace:

image

This is the same group in the old interface:

How to get this back?

Sorry for not thoroughly reading your post, and thanks for your answer.

I used a group with light entities, not a light group. I’ve changed it now and its working.

Thanks again!

1 Like

Hallo,
can you post your congiguration for light.yaml and ui-lovelace.yaml?

Thanks for your help

The examples for both are covered very well. I suggest you check out the documents:

Example yaml:

https://home-assistant-lovelace-gallery.netlify.com/

Which code do you used. Im also from Germany xD

Sorry for bumping a very old thread but I can’t figure this out and google leads me here.
I have no custom lovelace config. I have not “taken control” in the UI up to the right.

In the old states UI I can click on the title of a card to get brightness and colour controls for all the lights in that card while in lovelace I only get a toggle button at the top of each card but clicking the title does nothing. Adding light groups instead of only regular groups (which I’ve used sucessfully for years before lovelace) just creates a new card called “Lights” that contains the three light groups. It is these controls I want to have when clicking on the title of each card. What am I missing?

In my configuration.yaml I have the following:

group: !include groups.yaml
light: !include lights.yaml

groups.yaml contains this:

living_room:
  name: Living Room
  entities:
    - light.floor
    - light.ceiling_l
    - light.corner

second_room:
  name: Guest Room
  entities:
    - light.ceiling_s

bedroom:
  name: Bedroom
  entities:
    - light.bed
    - cover.cover_bedroom_level

kitchen:
  name: Kitchen
  entities:
    - light.ceiling_1
    - light.ceiling_2
    - light.table_1
    - light.table_2
    - light.sink

hallway:
  name: Hallway
  entities:
    - light.hall
    - light.front_door

lights.yaml contains this:

- platform: group
  name: Kitchen
  entities:
    - light.ceiling_1
    - light.ceiling_2
    - light.table_1
    - light.table_2
    - light.sink

- platform: group
  name: Hallway
  entities:
    - light.hall
    - light.front_door

- platform: group
  name: Living Room
  entities:
    - light.floor
    - light.ceiling_l
    - light.corner
1 Like

I’ve also detected that the individual lights are missing when switching to lovelace, did you find some workaround to be able to control the individual bulbs from some card?
I really like the light card but I can’t assign a group as an entity…

That’s why you make it a light group. So you can assign the light group to the light card. A light group is not the same as a group of lights. A group of lights is in the group domain, example: group.kitchen. Where as a light group, placed in the light domain, would look like light.kitchen.

1 Like

Indeed, the light group works fine, but in the interface if I place a group entity made of lights the popup shows all light controls (brightness, temperature, color, …) and in the bottom all the lights that belongs to this group…

I’m confused then. Because you state that you can’t control it here…

but then claim they are there here…

So what’s your question then? That you can’t control the individual lights with the light group pop up? Or that you need to know what card to use to get the list of lights in the pop up (for a group of lights)?

Let me explain: I’d like to use the light card with a group of lights (but light card doesn’t work with group entities)
If I create the a light with platform: group, I can have them in a light card, but the popup of the light (platform: group) doesn’t show the individual lights.

Anyway, I think I’ve found the solution, using lovelace-popup-card

Will give it a try and I’ll report results.

Yah, use the popup card as the long-press action and display an entities card with all the lights or just the group. If you go the group route, you’ll have pop ups on pop ups.

1 Like

@foraster, How did you go with this?

Still on my to-do list, have been addressing other smart home issues meanwhile.
In the middle time I created some scenes that fulfill my light control needs.

I’m facing a similar issue, doesn’t light.group support showing grouped entities individually on the pop-up card?

Sorry… this post is now a bit crap because it turns out new users can’t upload images! I’ve edited them out and you will just have to imagine based on the YAML…

I don’t think it does @hazio. Unless I am missing something.

This is the first google result for terms like “home assistant lovelace light group individual lights” so will document my findings so far a bit. My intent, and I think the intent of others in this thread is to get a lovelace ui that lets you control a group as one, but also lets you control individual lights.

Frustratingly some of the built-in components are nearly there but not quite.

The lights
For my examples, assume I have the following “light group” defined:

light:
  - platform: group
    name: James Desk Lights
    entities:
    - light.james_desk_left
    - light.james_desk_right
    - light.office_ceiling_james_desk
    - light.office_ceiling_door

And a “group” also defined:

james_desk_lights:
  name: James Desk Lights
  entities:
    - light.james_desk_left
    - light.james_desk_right
    - light.office_ceiling_james_desk
    - light.office_ceiling_door

Solution 1

A “light group” on an entity card, entities card, or light card.

Entity card config:

type: entity
entity: light.james_desk_lights

Lets you toggle the group as one.

Clicking the entity (or long holding on the light card) gives you a popup with colour controls and a toggle for the group… no individual entity control.

So solution one fails on the individual control.

Solution 2

A “group” (of lights) on an entity card, or entities card.

Entity card config:

type: entity
entity: group.james_desk_lights

Looks much the same (except for the absence of the light card option).
Clicking on the entity gives you individual toggles for each light in addition to the overall colour/brightness control.

This is closer but there is no option to individually control the colour of the lights. Just the group as a whole.

Solution 3

An entities card with each light added separately and a toggle header.

type: entities
entities:
  - entity: light.james_desk_left
  - entity: light.james_desk_right
  - entity: light.office_ceiling_james_desk
  - entity: light.office_ceiling_door
title: James Desk Lights

This gives you overall on/off of the group with the header toggle; and individual control of each light with toggle or a click to get to the colour controls.

But it does not give you control of the colour for the whole group at once.

Solution 4

image

My current solution, an entities card with explicit list and a “light group” (a “group” would work too, but the light toggles in the details are redundant) as a “header”.

type: entities
entities:
  - entity: light.james_desk_lights
  - type: divider
  - entity: light.james_desk_left
  - entity: light.james_desk_right
  - entity: light.office_ceiling_james_desk
  - entity: light.office_ceiling_door
show_header_toggle: false

So you can click on the top entity to get colour control or toggle the whole group. And the individual entities can be toggled or independently coloured.

2 Likes