diff --git a/homeassistant/components/fritz/common.py b/homeassistant/components/fritz/common.py index dede4b82c02..fa4096cb4ff 100644 --- a/homeassistant/components/fritz/common.py +++ b/homeassistant/components/fritz/common.py @@ -220,8 +220,8 @@ class FritzBoxTools(update_coordinator.DataUpdateCoordinator): """Update FritzboxTools data.""" try: await self.async_scan_devices() - except (FritzSecurityError, FritzConnectionException) as ex: - raise update_coordinator.UpdateFailed from ex + except FRITZ_EXCEPTIONS as ex: + raise update_coordinator.UpdateFailed(ex) from ex @property def unique_id(self) -> str: @@ -294,11 +294,19 @@ class FritzBoxTools(update_coordinator.DataUpdateCoordinator): def _get_wan_access(self, ip_address: str) -> bool | None: """Get WAN access rule for given IP address.""" - return not self.connection.call_action( - "X_AVM-DE_HostFilter:1", - "GetWANAccessByIP", - NewIPv4Address=ip_address, - ).get("NewDisallow") + try: + return not self.connection.call_action( + "X_AVM-DE_HostFilter:1", + "GetWANAccessByIP", + NewIPv4Address=ip_address, + ).get("NewDisallow") + except FRITZ_EXCEPTIONS as ex: + _LOGGER.debug( + "could not get WAN access rule for client device with IP '%s', error: %s", + ip_address, + ex, + ) + return None async def async_scan_devices(self, now: datetime | None = None) -> None: """Wrap up FritzboxTools class scan."""