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.
This commit is contained in:
Stefan Agner 2024-10-15 11:48:45 +02:00 committed by GitHub
parent ca94267c44
commit fca97cd734
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View File

@ -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";

View File

@ -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.", "") ||
""}
<span slot="secondary">${router.server}</span>