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:
Bram Kragten 2020-01-17 22:38:08 +01:00
parent c391b19c0e
commit fc29b519ae
2 changed files with 5 additions and 3 deletions

View File

@ -99,7 +99,8 @@ const splitByAreas = (
export const computeCards = (
states: Array<[string, HassEntity?]>,
entityCardOptions: Partial<EntitiesCardConfig>
entityCardOptions: Partial<EntitiesCardConfig>,
single = false
): LovelaceCardConfig[] => {
const cards: LovelaceCardConfig[] = [];
@ -132,7 +133,7 @@ export const computeCards = (
title: stateObj.attributes.friendly_name,
refresh_interval: stateObj.attributes.refresh,
});
} else if (domain === "light") {
} else if (domain === "light" && single) {
cards.push({
type: "light",
entity: entityId,

View File

@ -49,7 +49,8 @@ export class HuiDialogSuggestCard extends LitElement {
entityId,
this.hass.states[entityId],
]),
{}
{},
true
);
if (this._dialog) {
this._dialog.open();