From a87570cf5a6e02fbddd07517aeec940f17ceb6a1 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Tue, 16 Jun 2020 22:58:05 +0200 Subject: [PATCH] Add link to integrations page if zha or zwave are loaded. (#6159) --- .../config/dashboard/ha-config-dashboard.ts | 30 +++++++++++++++++++ src/translations/en.json | 5 ++++ 2 files changed, 35 insertions(+) diff --git a/src/panels/config/dashboard/ha-config-dashboard.ts b/src/panels/config/dashboard/ha-config-dashboard.ts index eeff0bfc9a..b416e3b9b9 100644 --- a/src/panels/config/dashboard/ha-config-dashboard.ts +++ b/src/panels/config/dashboard/ha-config-dashboard.ts @@ -85,6 +85,36 @@ class HaConfigDashboard extends LitElement { ` )} + ${isComponentLoaded(this.hass, "zha") + ? html` +
+ ${this.hass.localize( + "ui.panel.config.integration_panel_move.missing_zha", + "integrations_page", + html` + ${this.hass.localize( + "ui.panel.config.integration_panel_move.link_integration_page" + )} + ` + )} +
+ ` + : ""} + ${isComponentLoaded(this.hass, "zwave") + ? html` +
+ ${this.hass.localize( + "ui.panel.config.integration_panel_move.missing_zwave", + "integrations_page", + html` + ${this.hass.localize( + "ui.panel.config.integration_panel_move.link_integration_page" + )} + ` + )} +
+ ` + : ""} ${!this.showAdvanced ? html`
diff --git a/src/translations/en.json b/src/translations/en.json index 637832b9fa..25f1934c53 100755 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -520,6 +520,11 @@ "hint_enable": "Missing config options? Enable advanced mode on", "link_profile_page": "your profile page" }, + "integration_panel_move": { + "missing_zha": "Missing the ZHA config panel? It was moved to the ZHA entry on the {integrations_page}.", + "missing_zwave": "Missing the Z-Wave config panel? It was moved to the Z-Wave entry on the {integrations_page}.", + "link_integration_page": "integrations page" + }, "common": { "editor": { "confirm_unsaved": "You have unsaved changes. Are you sure you want to leave?"