From fca97cd734546f0013fedd043dc48d034126099a Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Tue, 15 Oct 2024 11:48:45 +0200 Subject: [PATCH] Prefer Thread border router instance name (#22378) Instead of using the model name (which is the same for all border routers of the same make and model), use the instance name as the border router name. Builds on https://github.com/home-assistant/core/pull/127253. --- src/data/thread.ts | 1 + .../integration-panels/thread/thread-config-panel.ts | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/data/thread.ts b/src/data/thread.ts index d999690a68..26bd38fc84 100644 --- a/src/data/thread.ts +++ b/src/data/thread.ts @@ -1,6 +1,7 @@ import { HomeAssistant } from "../types"; export interface ThreadRouter { + instance_name: string; addresses: [string]; border_agent_id: string | null; brand: "google" | "apple" | "homeassistant"; diff --git a/src/panels/config/integrations/integration-panels/thread/thread-config-panel.ts b/src/panels/config/integrations/integration-panels/thread/thread-config-panel.ts index e0da88509d..365343067c 100644 --- a/src/panels/config/integrations/integration-panels/thread/thread-config-panel.ts +++ b/src/panels/config/integrations/integration-panels/thread/thread-config-panel.ts @@ -234,7 +234,8 @@ export class ThreadConfigPanel extends SubscribeMixin(LitElement) { @error=${this._onImageError} @load=${this._onImageLoad} /> - ${router.model_name || + ${router.instance_name || + router.model_name || router.server?.replace(".local.", "") || ""} ${router.server}