Mark Yamaha media player as unavailable when unresponsive (#85018)
This commit is contained in:
parent
d9be9fe6d5
commit
4b178e88a4
1 changed files with 2 additions and 0 deletions
|
@ -217,8 +217,10 @@ class YamahaDevice(MediaPlayerEntity):
|
|||
self._play_status = self.receiver.play_status()
|
||||
except requests.exceptions.ConnectionError:
|
||||
_LOGGER.info("Receiver is offline: %s", self._name)
|
||||
self._attr_available = False
|
||||
return
|
||||
|
||||
self._attr_available = True
|
||||
if self.receiver.on:
|
||||
if self._play_status is None:
|
||||
self._attr_state = MediaPlayerState.ON
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue