diff --git a/src/panels/lovelace/editor/config-elements/hui-view-editor.ts b/src/panels/lovelace/editor/config-elements/hui-view-editor.ts index 872c776663..64ee490639 100644 --- a/src/panels/lovelace/editor/config-elements/hui-view-editor.ts +++ b/src/panels/lovelace/editor/config-elements/hui-view-editor.ts @@ -28,7 +28,8 @@ export class HuiViewEditor extends hassLocalizeLitMixin(LitElement) { if (!this._config) { return ""; } - return this._config.id || ""; + + return "id" in this._config ? this._config.id! : ""; } get _title(): string { diff --git a/src/panels/lovelace/editor/hui-dialog-edit-view.ts b/src/panels/lovelace/editor/hui-dialog-edit-view.ts index 4959cd1227..3f4d13129f 100644 --- a/src/panels/lovelace/editor/hui-dialog-edit-view.ts +++ b/src/panels/lovelace/editor/hui-dialog-edit-view.ts @@ -42,7 +42,7 @@ export class HuiDialogEditView extends LitElement { if ( !this._params.add && this._params.viewConfig && - !this._params.viewConfig.id + !("id" in this._params.viewConfig) ) { return html` { this.fire("config-refresh");