mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Fix conntected_to
attribute of device tracker entities in a AVM Fritz mesh setup (#129259)
ignore orphan node links
This commit is contained in:
parent
3bd0fca633
commit
3165f92b6b
@ -606,6 +606,9 @@ class FritzBoxTools(DataUpdateCoordinator[UpdateCoordinatorDataType]):
|
|||||||
dev_info: Device = hosts[dev_mac]
|
dev_info: Device = hosts[dev_mac]
|
||||||
|
|
||||||
for link in interf["node_links"]:
|
for link in interf["node_links"]:
|
||||||
|
if link.get("state") != "CONNECTED":
|
||||||
|
continue # ignore orphan node links
|
||||||
|
|
||||||
intf = mesh_intf.get(link["node_interface_1_uid"])
|
intf = mesh_intf.get(link["node_interface_1_uid"])
|
||||||
if intf is not None:
|
if intf is not None:
|
||||||
if intf["op_mode"] == "AP_GUEST":
|
if intf["op_mode"] == "AP_GUEST":
|
||||||
|
@ -655,7 +655,23 @@ MOCK_MESH_DATA = {
|
|||||||
"cur_data_rate_tx": 0,
|
"cur_data_rate_tx": 0,
|
||||||
"cur_availability_rx": 99,
|
"cur_availability_rx": 99,
|
||||||
"cur_availability_tx": 99,
|
"cur_availability_tx": 99,
|
||||||
}
|
},
|
||||||
|
{
|
||||||
|
"uid": "nl-79",
|
||||||
|
"type": "LAN",
|
||||||
|
"state": "DISCONNECTED",
|
||||||
|
"last_connected": 1642872667,
|
||||||
|
"node_1_uid": "n-167",
|
||||||
|
"node_2_uid": "n-76",
|
||||||
|
"node_interface_1_uid": "ni-140",
|
||||||
|
"node_interface_2_uid": "ni-77",
|
||||||
|
"max_data_rate_rx": 1000000,
|
||||||
|
"max_data_rate_tx": 1000000,
|
||||||
|
"cur_data_rate_rx": 0,
|
||||||
|
"cur_data_rate_tx": 0,
|
||||||
|
"cur_availability_rx": 99,
|
||||||
|
"cur_availability_tx": 99,
|
||||||
|
},
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user