Fritz: fix unbound topology (#66877)
Co-authored-by: Michael <35783820+mib1185@users.noreply.github.com> Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>pull/66919/head
parent
3c15fe8587
commit
f0fbc7bb2c
|
@ -331,6 +331,7 @@ class FritzBoxTools(update_coordinator.DataUpdateCoordinator):
|
||||||
_LOGGER.debug("Checking host info for FRITZ!Box device %s", self.host)
|
_LOGGER.debug("Checking host info for FRITZ!Box device %s", self.host)
|
||||||
self._update_available, self._latest_firmware = self._update_device_info()
|
self._update_available, self._latest_firmware = self._update_device_info()
|
||||||
|
|
||||||
|
topology: dict = {}
|
||||||
if (
|
if (
|
||||||
"Hosts1" not in self.connection.services
|
"Hosts1" not in self.connection.services
|
||||||
or "X_AVM-DE_GetMeshListPath"
|
or "X_AVM-DE_GetMeshListPath"
|
||||||
|
@ -372,7 +373,7 @@ class FritzBoxTools(update_coordinator.DataUpdateCoordinator):
|
||||||
|
|
||||||
mesh_intf = {}
|
mesh_intf = {}
|
||||||
# first get all meshed devices
|
# first get all meshed devices
|
||||||
for node in topology["nodes"]:
|
for node in topology.get("nodes", []):
|
||||||
if not node["is_meshed"]:
|
if not node["is_meshed"]:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
@ -389,7 +390,7 @@ class FritzBoxTools(update_coordinator.DataUpdateCoordinator):
|
||||||
self.mesh_role = MeshRoles(node["mesh_role"])
|
self.mesh_role = MeshRoles(node["mesh_role"])
|
||||||
|
|
||||||
# second get all client devices
|
# second get all client devices
|
||||||
for node in topology["nodes"]:
|
for node in topology.get("nodes", []):
|
||||||
if node["is_meshed"]:
|
if node["is_meshed"]:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue