Frontend: Allow specifying multiple lights for a light card

Created on 23 Jan 2020  路  9Comments  路  Source: home-assistant/frontend

The request

_This could work for other places in Lovelace too, especially entity rows would be great for this, but let's start small!_

I would like to be able to have a light card control multiple lights. The light card should work as a virtual group that is frontend only. If any light is on: show light card as on. Don't try to mangle the colors, just normal yellow. If all cards are off, show icon as off. If any light is on, tapping it will turn all off.

The alternatives


Group in YAML.

Additional information

feature-request

Most helpful comment

Perhaps my idea in #4242 (which wasn't possible due to missing backend info) could be implemented in a different way here. If the card contains more than one entity (and the user hasn't specified an icon override yet), change the icon to mdi:lightbulb-multiple. Would make it a little more clear that it's controlling multiple lights.

All 9 comments

Additional alternative is the actual light group.

You'll also have to contend with what to show for more-info

MVP will be no more info.

Perhaps my idea in #4242 (which wasn't possible due to missing backend info) could be implemented in a different way here. If the card contains more than one entity (and the user hasn't specified an icon override yet), change the icon to mdi:lightbulb-multiple. Would make it a little more clear that it's controlling multiple lights.

How should we display brightness? Should one light be the master for current value? It is not guaranteed that they will all have the same value let alone even support brightness

For implementation, implement a getInfo function that normalizes the info from 1 or multiple bulbs into an object that contains brightness, color etc.

We use light groups instead.

@balloob anyone working on light group helpers like inputs?

Not yet.

Was this page helpful?
0 / 5 - 0 ratings