From df52f3f0e115d9f874f1c816473411cff8b75342 Mon Sep 17 00:00:00 2001 From: Oliver <10700296+ol-iver@users.noreply.github.com> Date: Mon, 14 Oct 2024 23:23:44 +0200 Subject: [PATCH] Fix initialization of some `denonavr` receivers when telnet API is enabled (#127882) Suppress `denonavr.exceptions.AvrProcessingError` when connecting to telnet API --- homeassistant/components/denonavr/receiver.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/denonavr/receiver.py b/homeassistant/components/denonavr/receiver.py index ebe09f518fb1bc..cbafe35cfc58a2 100644 --- a/homeassistant/components/denonavr/receiver.py +++ b/homeassistant/components/denonavr/receiver.py @@ -3,9 +3,11 @@ from __future__ import annotations from collections.abc import Callable +import contextlib import logging from denonavr import DenonAVR +from denonavr.exceptions import AvrProcessingError import httpx _LOGGER = logging.getLogger(__name__) @@ -94,7 +96,8 @@ async def async_init_receiver_class(self) -> None: # Do an initial update if telnet is used. if self._use_telnet: for zone in receiver.zones.values(): - await zone.async_update() + with contextlib.suppress(AvrProcessingError): + await zone.async_update() if self._update_audyssey: await zone.async_update_audyssey() await receiver.async_telnet_connect()