diff --git a/src/dialogs/more-info/ha-more-info-dialog.ts b/src/dialogs/more-info/ha-more-info-dialog.ts index 81d5777a45..b3a19a341d 100644 --- a/src/dialogs/more-info/ha-more-info-dialog.ts +++ b/src/dialogs/more-info/ha-more-info-dialog.ts @@ -96,7 +96,6 @@ interface ChildView { viewTitle?: string; viewImport?: () => Promise; viewParams?: any; - keepHeader?: boolean; } declare global { @@ -350,7 +349,6 @@ export class MoreInfoDialog extends ScrollableFadeMixin(LitElement) { this._childView = { viewTag: "ha-more-info-attributes", viewParams: { entityId: this._entityId }, - keepHeader: true, }; } @@ -406,12 +404,9 @@ export class MoreInfoDialog extends ScrollableFadeMixin(LitElement) { const deviceType = (deviceId && this.hass.devices[deviceId].entry_type) || "device"; - const isDefaultView = - this._currView === DEFAULT_VIEW && - (!this._childView || this._childView.keepHeader); + const isDefaultView = this._currView === DEFAULT_VIEW && !this._childView; const isSpecificInitialView = - this._initialView !== DEFAULT_VIEW && - (!this._childView || this._childView.keepHeader); + this._initialView !== DEFAULT_VIEW && !this._childView; const showCloseIcon = (isDefaultView && this._parentEntityIds.length === 0 && @@ -450,12 +445,7 @@ export class MoreInfoDialog extends ScrollableFadeMixin(LitElement) { const breadcrumb = [areaName, deviceName, entityName].filter( (v): v is string => Boolean(v) ); - const title = - (this._childView && !this._childView.keepHeader - ? this._childView.viewTitle - : undefined) || - breadcrumb.pop() || - entityId; + const title = this._childView?.viewTitle || breadcrumb.pop() || entityId; const isRTL = computeRTL(this.hass);