Store instance name in Thread router discovery (#127253)

* Store instance name in Thread router discovery

Store the DNS-SD instance name in the Thread router discovery message.
The instance name is the actual name given to a Thread border router,
e.g. when configuring the name of a Thread border router in Apple Home
the name appears as the DNS-SD instance name. This will allow to make
the Thread border router list more user friendly.

* Use instance_name_from_service_info to get instance name
This commit is contained in:
Stefan Agner
2024-10-02 21:41:55 +02:00
committed by GitHub
parent a83d38a5fe
commit 88ad7e98e0
3 changed files with 15 additions and 1 deletions

View File

@@ -353,6 +353,7 @@ async def test_discover_routers(
assert msg == {
"event": {
"data": {
"instance_name": "HomeAssistant OpenThreadBorderRouter #0BBF",
"addresses": ["192.168.0.115"],
"border_agent_id": "230c6a1ac57f6f4be262acf32e5ef52c",
"brand": "homeassistant",
@@ -388,6 +389,7 @@ async def test_discover_routers(
"brand": "google",
"extended_address": "f6a99b425a67abed",
"extended_pan_id": "9e75e256f61409a3",
"instance_name": "Google-Nest-Hub-#ABED",
"model_name": "Google Nest Hub",
"network_name": "NEST-PAN-E1AF",
"server": "2d99f293-cd8e-2770-8dd2-6675de9fa000.local.",