1
mirror of https://github.com/home-assistant/core synced 2024-09-12 15:16:21 +02:00

Fix detection of client wan-access rule in AVM Fritz!Box Tools (#97708)

This commit is contained in:
Michael 2023-08-03 20:36:09 +02:00 committed by GitHub
parent 5e2d3b13b0
commit c43e6d9bd1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -469,6 +469,11 @@ class FritzBoxTools(
if not host.get("MACAddress"):
continue
if (wan_access := host.get("X_AVM-DE_WANAccess")) is not None:
wan_access_result = "granted" in wan_access
else:
wan_access_result = None
hosts[host["MACAddress"]] = Device(
name=host["HostName"],
connected=host["Active"],
@ -476,7 +481,7 @@ class FritzBoxTools(
connection_type="",
ip_address=host["IPAddress"],
ssid=None,
wan_access="granted" in host["X_AVM-DE_WANAccess"],
wan_access=wan_access_result,
)
if not self.fritz_status.device_has_mesh_support or (