mirror of
https://github.com/home-assistant/core.git
synced 2025-07-15 09:17:10 +00:00
Mark Yamaha media player as unavailable when unresponsive (#85018)
This commit is contained in:
parent
d9be9fe6d5
commit
4b178e88a4
@ -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…
x
Reference in New Issue
Block a user