diff --git a/src/panels/config/dashboard/ha-config-dashboard.ts b/src/panels/config/dashboard/ha-config-dashboard.ts
index 3d7dc017f8..5e033fcf4c 100644
--- a/src/panels/config/dashboard/ha-config-dashboard.ts
+++ b/src/panels/config/dashboard/ha-config-dashboard.ts
@@ -1,4 +1,4 @@
-import { mdiCellphoneCog, mdiCloudLock } from "@mdi/js";
+import { mdiCloudLock } from "@mdi/js";
import "@polymer/app-layout/app-header/app-header";
import "@polymer/app-layout/app-toolbar/app-toolbar";
import {
@@ -110,29 +110,10 @@ class HaConfigDashboard extends LitElement {
>
`
: ""}
- ${this._externalConfig?.hasSettingsScreen
- ? html`
-
- `
- : ""}
@@ -142,13 +123,6 @@ class HaConfigDashboard extends LitElement {
`;
}
- private _handleExternalAppConfiguration(ev: Event) {
- ev.preventDefault();
- this.hass.auth.external!.fireMessage({
- type: "config_screen/show",
- });
- }
-
static get styles(): CSSResultGroup {
return [
haStyle,
diff --git a/src/panels/config/dashboard/ha-config-navigation.ts b/src/panels/config/dashboard/ha-config-navigation.ts
index b577fe1abe..be8a3ba893 100644
--- a/src/panels/config/dashboard/ha-config-navigation.ts
+++ b/src/panels/config/dashboard/ha-config-navigation.ts
@@ -6,6 +6,7 @@ import { canShowPage } from "../../../common/config/can_show_page";
import "../../../components/ha-card";
import "../../../components/ha-icon-next";
import { CloudStatus, CloudStatusLoggedIn } from "../../../data/cloud";
+import { ExternalConfig } from "../../../external_app/external_config";
import { PageNavigation } from "../../../layouts/hass-tabs-subpage";
import { HomeAssistant } from "../../../types";
@@ -19,10 +20,16 @@ class HaConfigNavigation extends LitElement {
@property() public pages!: PageNavigation[];
+ @property() public externalConfig?: ExternalConfig;
+
protected render(): TemplateResult {
return html`
${this.pages.map((page) =>
- canShowPage(this.hass, page)
+ (
+ page.path === "#external-app-configuration"
+ ? !this.externalConfig?.hasSettingsScreen
+ : canShowPage(this.hass, page)
+ )
? html`
@@ -77,6 +84,16 @@ class HaConfigNavigation extends LitElement {
private _entryClicked(ev) {
ev.currentTarget.blur();
+ if (
+ ev.currentTarget.parentElement.href.endsWith(
+ "#external-app-configuration"
+ )
+ ) {
+ ev.preventDefault();
+ this.hass.auth.external!.fireMessage({
+ type: "config_screen/show",
+ });
+ }
}
static get styles(): CSSResultGroup {
diff --git a/src/panels/config/ha-panel-config.ts b/src/panels/config/ha-panel-config.ts
index 4c23f77086..6d456d6e45 100644
--- a/src/panels/config/ha-panel-config.ts
+++ b/src/panels/config/ha-panel-config.ts
@@ -1,6 +1,7 @@
import {
mdiAccount,
mdiBadgeAccountHorizontal,
+ mdiCellphoneCog,
mdiCog,
mdiDevices,
mdiHomeAssistant,
@@ -111,6 +112,13 @@ export const configSections: { [name: string]: PageNavigation[] } = {
iconColor: "#E48629",
components: ["person", "zone", "users"],
},
+ {
+ path: "#external-app-configuration",
+ name: "Companion App",
+ description: "Location and notifications",
+ iconPath: mdiCellphoneCog,
+ iconColor: "#81009D",
+ },
{
path: "/config/core",
name: "Settings",