From c403c77cff0ea684027bf99f472e4fab5a52d34d Mon Sep 17 00:00:00 2001 From: Villhellm Date: Sun, 2 Aug 2020 12:06:16 -0700 Subject: [PATCH] Catch AssertionError when onkyo zone 3 detection fails (#38374) This error would cause the entire integration to fail. This at least catches it gracefully. --- homeassistant/components/onkyo/media_player.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/homeassistant/components/onkyo/media_player.py b/homeassistant/components/onkyo/media_player.py index da33ff5f018..2b67f06ac3c 100644 --- a/homeassistant/components/onkyo/media_player.py +++ b/homeassistant/components/onkyo/media_player.py @@ -134,6 +134,8 @@ def determine_zones(receiver): if str(error) != TIMEOUT_MESSAGE: raise error _LOGGER.debug("Zone 3 timed out, assuming no functionality") + except AssertionError: + _LOGGER.error("Zone 3 detection failed") return out