mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 19:27:45 +00:00
parent
e2636587f8
commit
895c0be82c
@ -385,11 +385,12 @@ class FritzBoxTools(
|
||||
if not raw_data:
|
||||
return {}
|
||||
|
||||
items = xmltodict.parse(raw_data["NewDeflectionList"])["List"]["Item"]
|
||||
xml_data = xmltodict.parse(raw_data["NewDeflectionList"])
|
||||
if xml_data.get("List") and (items := xml_data["List"].get("Item")) is not None:
|
||||
if not isinstance(items, list):
|
||||
items = [items]
|
||||
|
||||
return {int(item["DeflectionId"]): item for item in items}
|
||||
return {}
|
||||
|
||||
async def _async_get_wan_access(self, ip_address: str) -> bool | None:
|
||||
"""Get WAN access rule for given IP address."""
|
||||
|
Loading…
x
Reference in New Issue
Block a user