Compare commits
1 Commits
8cbe33eb72
...
02bdcc5d4b
| Author | SHA1 | Date | |
|---|---|---|---|
| 02bdcc5d4b |
@@ -199,6 +199,10 @@ class MediaPlayerCoordinator(DataUpdateCoordinator[dict[str, Any]]):
|
||||
# Re-enable polling as fallback
|
||||
self.update_interval = timedelta(seconds=self._poll_interval)
|
||||
_LOGGER.warning("WebSocket disconnected, falling back to polling")
|
||||
# Trigger an immediate refresh to restart the polling loop.
|
||||
# Without this, the polling loop stays stopped (it was disabled when
|
||||
# WebSocket was active) and the entity never becomes unavailable.
|
||||
self.hass.async_create_task(self.async_request_refresh())
|
||||
# Schedule reconnect attempt
|
||||
self._schedule_reconnect()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user