From 6ca77785dba9a1b754e02d3d83188cdef026f34d Mon Sep 17 00:00:00 2001 From: ol-iver Date: Tue, 24 Sep 2024 22:17:27 +0000 Subject: [PATCH 1/3] Update `denonavr` to `v1.0.0` --- homeassistant/components/denonavr/manifest.json | 2 +- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/denonavr/manifest.json b/homeassistant/components/denonavr/manifest.json index 9188009bde5e50..eff70b94a18fd2 100644 --- a/homeassistant/components/denonavr/manifest.json +++ b/homeassistant/components/denonavr/manifest.json @@ -6,7 +6,7 @@ "documentation": "https://www.home-assistant.io/integrations/denonavr", "iot_class": "local_push", "loggers": ["denonavr"], - "requirements": ["denonavr==0.11.6"], + "requirements": ["denonavr==1.0.0"], "ssdp": [ { "manufacturer": "Denon", diff --git a/requirements_all.txt b/requirements_all.txt index 75a31aee56ea4d..242bdb117a8d52 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -738,7 +738,7 @@ deluge-client==1.10.2 demetriek==0.4.0 # homeassistant.components.denonavr -denonavr==0.11.6 +denonavr==1.0.0 # homeassistant.components.devialet devialet==1.4.5 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 060f235f1f5953..ecf498c0290575 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -628,7 +628,7 @@ deluge-client==1.10.2 demetriek==0.4.0 # homeassistant.components.denonavr -denonavr==0.11.6 +denonavr==1.0.0 # homeassistant.components.devialet devialet==1.4.5 From 1078f17721258633d8b467944735f7b0ea78d3d4 Mon Sep 17 00:00:00 2001 From: ol-iver Date: Tue, 24 Sep 2024 22:20:02 +0000 Subject: [PATCH 2/3] Remove duplicate query to receiver during `async_setup_entry` We set `update_before_add=True` anyway which also performs the query. Additionally, the removed call could cause an uncaught exception, e.g. on timeouts. --- homeassistant/components/denonavr/media_player.py | 1 - 1 file changed, 1 deletion(-) diff --git a/homeassistant/components/denonavr/media_player.py b/homeassistant/components/denonavr/media_player.py index a6a94404fd39ab..03d1b00cfaf328 100644 --- a/homeassistant/components/denonavr/media_player.py +++ b/homeassistant/components/denonavr/media_player.py @@ -125,7 +125,6 @@ async def async_setup_entry( unique_id = f"{config_entry.unique_id}-{receiver_zone.zone}" else: unique_id = f"{config_entry.entry_id}-{receiver_zone.zone}" - await receiver_zone.async_setup() entities.append( DenonDevice( receiver_zone, From e7f379bcc7fdcb7ad4f65bb275c0374b65bd5489 Mon Sep 17 00:00:00 2001 From: ol-iver Date: Tue, 24 Sep 2024 23:15:01 +0000 Subject: [PATCH 3/3] Update all configured zones before telnet is connected --- homeassistant/components/denonavr/receiver.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/denonavr/receiver.py b/homeassistant/components/denonavr/receiver.py index abee5ed74d2131..ebe09f518fb1bc 100644 --- a/homeassistant/components/denonavr/receiver.py +++ b/homeassistant/components/denonavr/receiver.py @@ -93,9 +93,10 @@ async def async_init_receiver_class(self) -> None: await receiver.async_setup() # Do an initial update if telnet is used. if self._use_telnet: - await receiver.async_update() - if self._update_audyssey: - await receiver.async_update_audyssey() + for zone in receiver.zones.values(): + await zone.async_update() + if self._update_audyssey: + await zone.async_update_audyssey() await receiver.async_telnet_connect() self._receiver = receiver