Skip to content

Commit

Permalink
Prefer Thread border router instance name (#22378)
Browse files Browse the repository at this point in the history
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 home-assistant/core#127253.
  • Loading branch information
agners authored Oct 15, 2024
1 parent ca94267 commit fca97cd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/data/thread.ts
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit fca97cd

Please sign in to comment.