No longer thrown an error when device is offline in linkplay (#130161)

This commit is contained in:
Simon Lamon 2024-11-09 16:11:34 +01:00 committed by GitHub
parent c10f078f2a
commit 97fa568876
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -9,7 +9,7 @@ from typing import Any, Concatenate
from linkplay.bridge import LinkPlayBridge
from linkplay.consts import EqualizerMode, LoopMode, PlayingMode, PlayingStatus
from linkplay.controller import LinkPlayController, LinkPlayMultiroom
from linkplay.exceptions import LinkPlayException, LinkPlayRequestException
from linkplay.exceptions import LinkPlayRequestException
import voluptuous as vol
from homeassistant.components import media_source
@ -201,9 +201,8 @@ class LinkPlayMediaPlayerEntity(MediaPlayerEntity):
try:
await self._bridge.player.update_status()
self._update_properties()
except LinkPlayException:
except LinkPlayRequestException:
self._attr_available = False
raise
@exception_wrap
async def async_select_source(self, source: str) -> None: