mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-22 16:56:35 +00:00
Don't use light card in generated Lovelace mode (#4505)
* Don't make seperate card for grouped lights * Update generate-lovelace-config.ts * Don't use light group at all in generated UI
This commit is contained in:
parent
c391b19c0e
commit
fc29b519ae
@ -99,7 +99,8 @@ const splitByAreas = (
|
|||||||
|
|
||||||
export const computeCards = (
|
export const computeCards = (
|
||||||
states: Array<[string, HassEntity?]>,
|
states: Array<[string, HassEntity?]>,
|
||||||
entityCardOptions: Partial<EntitiesCardConfig>
|
entityCardOptions: Partial<EntitiesCardConfig>,
|
||||||
|
single = false
|
||||||
): LovelaceCardConfig[] => {
|
): LovelaceCardConfig[] => {
|
||||||
const cards: LovelaceCardConfig[] = [];
|
const cards: LovelaceCardConfig[] = [];
|
||||||
|
|
||||||
@ -132,7 +133,7 @@ export const computeCards = (
|
|||||||
title: stateObj.attributes.friendly_name,
|
title: stateObj.attributes.friendly_name,
|
||||||
refresh_interval: stateObj.attributes.refresh,
|
refresh_interval: stateObj.attributes.refresh,
|
||||||
});
|
});
|
||||||
} else if (domain === "light") {
|
} else if (domain === "light" && single) {
|
||||||
cards.push({
|
cards.push({
|
||||||
type: "light",
|
type: "light",
|
||||||
entity: entityId,
|
entity: entityId,
|
||||||
|
@ -49,7 +49,8 @@ export class HuiDialogSuggestCard extends LitElement {
|
|||||||
entityId,
|
entityId,
|
||||||
this.hass.states[entityId],
|
this.hass.states[entityId],
|
||||||
]),
|
]),
|
||||||
{}
|
{},
|
||||||
|
true
|
||||||
);
|
);
|
||||||
if (this._dialog) {
|
if (this._dialog) {
|
||||||
this._dialog.open();
|
this._dialog.open();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user