From 3f113da056e1b52eddcba6900de488bb6f6db868 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Wed, 5 Dec 2018 17:25:43 +0100 Subject: [PATCH] Fix: View should have cards (#2184) * View should have cards * Don't need CardConfig yet --- src/panels/lovelace/editor/hui-edit-view.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/panels/lovelace/editor/hui-edit-view.ts b/src/panels/lovelace/editor/hui-edit-view.ts index 273df58052..a6ed38966d 100644 --- a/src/panels/lovelace/editor/hui-edit-view.ts +++ b/src/panels/lovelace/editor/hui-edit-view.ts @@ -78,8 +78,8 @@ export class HuiEditView extends hassLocalizeLitMixin(LitElement) { (changedProperties.get("viewConfig") as LovelaceViewConfig).id) ) { const { cards, badges, ...viewConfig } = this.viewConfig; - this._badges = processEditorEntities(badges); this._config = viewConfig; + this._badges = processEditorEntities(badges); } else if (changedProperties.has("add")) { this._config = {}; this._badges = []; @@ -228,6 +228,7 @@ export class HuiEditView extends hassLocalizeLitMixin(LitElement) { try { if (this.add) { + this._config.cards = []; await addView(this.hass!, this._config, "json"); } else { await updateViewConfig(