Fix unreachable DenonAVR reporting as available when polling fails (#74344)

pull/74522/head
David Brückmann 2022-07-05 12:25:20 +02:00 committed by Paulus Schoutsen
parent 3aafa0cf49
commit a90654bd63
1 changed files with 2 additions and 0 deletions

View File

@ -204,12 +204,14 @@ class DenonDevice(MediaPlayerEntity):
) )
self._available = False self._available = False
except AvrCommandError as err: except AvrCommandError as err:
available = False
_LOGGER.error( _LOGGER.error(
"Command %s failed with error: %s", "Command %s failed with error: %s",
func.__name__, func.__name__,
err, err,
) )
except DenonAvrError as err: except DenonAvrError as err:
available = False
_LOGGER.error( _LOGGER.error(
"Error %s occurred in method %s for Denon AVR receiver", "Error %s occurred in method %s for Denon AVR receiver",
err, err,