diff --git a/src/panels/lovelace/editor/view-editor/hui-edit-view.ts b/src/panels/lovelace/editor/view-editor/hui-edit-view.ts index 9524f1e398..2ebc70dc70 100644 --- a/src/panels/lovelace/editor/view-editor/hui-edit-view.ts +++ b/src/panels/lovelace/editor/view-editor/hui-edit-view.ts @@ -87,6 +87,18 @@ export class HuiEditView extends LitElement { return this.shadowRoot!.querySelector("ha-paper-dialog")!; } + private get _viewConfigTitle(): string { + if (!this._config || !this._config.title) { + return this.hass!.localize("ui.panel.lovelace.editor.edit_view.header"); + } + + return this.hass!.localize( + "ui.panel.lovelace.editor.edit_view.header_name", + "name", + this._config.title + ); + } + protected render(): TemplateResult | void { let content; switch (this._curTab) { @@ -118,7 +130,7 @@ export class HuiEditView extends LitElement { return html`

- ${this.hass!.localize("ui.panel.lovelace.editor.edit_view.header")} + ${this._viewConfigTitle}