diff --git a/homeassistant/components/denonavr/manifest.json b/homeassistant/components/denonavr/manifest.json index 0ba8caed6c585eabe7a9b75ec5cb7a244882d3f3..9188009bde5e503b8e2b4363525fd68ef3372ec1 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.4"], + "requirements": ["denonavr==0.11.6"], "ssdp": [ { "manufacturer": "Denon", diff --git a/homeassistant/components/denonavr/media_player.py b/homeassistant/components/denonavr/media_player.py index 125fec7caaa9d1b6365b8ec29e7b33788fa43ce5..f5050af357d2eb2ce342cb689de5f93e3548c720 100644 --- a/homeassistant/components/denonavr/media_player.py +++ b/homeassistant/components/denonavr/media_player.py @@ -21,6 +21,7 @@ from denonavr.exceptions import ( AvrCommandError, AvrForbiddenError, AvrNetworkError, + AvrProcessingError, AvrTimoutError, DenonAvrError, ) @@ -201,6 +202,16 @@ def async_log_errors( self._receiver.host, ) self._attr_available = False + except AvrProcessingError: + available = True + if self.available: + _LOGGER.warning( + ( + "Update of Denon AVR receiver at host %s not complete. " + "Device is still available" + ), + self._receiver.host, + ) except AvrForbiddenError: available = False if self.available: @@ -274,8 +285,6 @@ class DenonDevice(MediaPlayerEntity): and MediaPlayerEntityFeature.SELECT_SOUND_MODE ) - self._telnet_was_healthy: bool | None = None - async def _telnet_callback(self, zone: str, event: str, parameter: str) -> None: """Process a telnet command callback.""" # There are multiple checks implemented which reduce unnecessary updates of the ha state machine @@ -306,24 +315,13 @@ class DenonDevice(MediaPlayerEntity): """Get the latest status information from device.""" receiver = self._receiver - # We can only skip the update if telnet was healthy after - # the last update and is still healthy now to ensure that - # we don't miss any state changes while telnet is down - # or reconnecting. - if ( - telnet_is_healthy := receiver.telnet_connected and receiver.telnet_healthy - ) and self._telnet_was_healthy: + # We skip the update if telnet is healthy. + # When telnet recovers it automatically updates all properties. + if receiver.telnet_connected and receiver.telnet_healthy: return - # if async_update raises an exception, we don't want to skip the next update - # so we set _telnet_was_healthy to None here and only set it to the value - # before the update if the update was successful - self._telnet_was_healthy = None - await receiver.async_update() - self._telnet_was_healthy = telnet_is_healthy - if self._update_audyssey: await receiver.async_update_audyssey() diff --git a/requirements_all.txt b/requirements_all.txt index 629cf201f767a1e0aea6d75298b8455b47161f50..8d819f4b931f124a1693a8725a1179edab88ffe9 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -704,7 +704,7 @@ deluge-client==1.7.1 demetriek==0.4.0 # homeassistant.components.denonavr -denonavr==0.11.4 +denonavr==0.11.6 # homeassistant.components.devialet devialet==1.4.5 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index cd306a658405f6823ae4f8adbbb480979eefa9b9..139baf8d95f5475602719e50cf39ced41b10389c 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -579,7 +579,7 @@ deluge-client==1.7.1 demetriek==0.4.0 # homeassistant.components.denonavr -denonavr==0.11.4 +denonavr==0.11.6 # homeassistant.components.devialet devialet==1.4.5