From 4300484ca0a39c5e7badaa12f2e7420ad6e56ce3 Mon Sep 17 00:00:00 2001 From: ollo69 <60491700+ollo69@users.noreply.github.com> Date: Mon, 14 Jun 2021 00:20:02 +0200 Subject: [PATCH] Catch AsusWRT UnicodeDecodeError in get_nvram call (#51811) --- homeassistant/components/asuswrt/router.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/asuswrt/router.py b/homeassistant/components/asuswrt/router.py index 6f22ddbbd6e..4cea9148470 100644 --- a/homeassistant/components/asuswrt/router.py +++ b/homeassistant/components/asuswrt/router.py @@ -424,7 +424,7 @@ async def _get_nvram_info(api: AsusWrt, info_type: str) -> dict[str, Any]: info = {} try: info = await api.async_get_nvram(info_type) - except OSError as exc: + except (OSError, UnicodeDecodeError) as exc: _LOGGER.warning("Error calling method async_get_nvram(%s): %s", info_type, exc) return info