From f01fe65be40aca9f372ecc224627aca9052e6f83 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Fri, 11 Sep 2020 22:42:11 +0200 Subject: [PATCH] Show title and name for default panels (#6941) Fixes #6927 --- src/components/ha-sidebar.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/components/ha-sidebar.ts b/src/components/ha-sidebar.ts index 07508cfe3e..73e121c4f9 100644 --- a/src/components/ha-sidebar.ts +++ b/src/components/ha-sidebar.ts @@ -651,11 +651,13 @@ class HaSidebar extends LitElement { return panels.map((panel) => this._renderPanel( panel.url_path, - panel.url_path === "lovelace" - ? this.hass.localize("panel.states") + panel.url_path === this.hass.defaultPanel + ? panel.title || this.hass.localize("panel.states") : this.hass.localize(`panel.${panel.title}`) || panel.title, - panel.url_path === "lovelace" ? undefined : panel.icon, - panel.url_path === "lovelace" ? mdiViewDashboard : undefined + panel.icon, + panel.url_path === this.hass.defaultPanel && !panel.icon + ? mdiViewDashboard + : undefined ) ); }