mirror of
https://github.com/home-assistant/core.git
synced 2025-07-15 09:17:10 +00:00
Fix internet access switch for Fritz Wi-Fi guest devices (#63407)
This commit is contained in:
parent
c1967abfca
commit
cd5bd2ff8b
@ -110,7 +110,7 @@ class Device:
|
||||
ip_address: str
|
||||
name: str
|
||||
ssid: str | None
|
||||
wan_access: bool
|
||||
wan_access: bool = True
|
||||
|
||||
|
||||
class Interface(TypedDict):
|
||||
@ -118,6 +118,7 @@ class Interface(TypedDict):
|
||||
|
||||
device: str
|
||||
mac: str
|
||||
op_mode: str
|
||||
ssid: str | None
|
||||
type: str
|
||||
|
||||
@ -331,6 +332,7 @@ class FritzBoxTools(update_coordinator.DataUpdateCoordinator):
|
||||
mesh_intf[interf["uid"]] = Interface(
|
||||
device=node["device_name"],
|
||||
mac=int_mac,
|
||||
op_mode=interf.get("op_mode", ""),
|
||||
ssid=interf.get("ssid", ""),
|
||||
type=interf["type"],
|
||||
)
|
||||
@ -352,6 +354,7 @@ class FritzBoxTools(update_coordinator.DataUpdateCoordinator):
|
||||
and dev_mac in hosts
|
||||
):
|
||||
dev_info: Device = hosts[dev_mac]
|
||||
if intf["op_mode"] != "AP_GUEST":
|
||||
dev_info.wan_access = not self.connection.call_action(
|
||||
"X_AVM-DE_HostFilter:1",
|
||||
"GetWANAccessByIP",
|
||||
|
Loading…
x
Reference in New Issue
Block a user