From f3994e14720d0bb3c5dfd959f93404cf4f815937 Mon Sep 17 00:00:00 2001 From: Alex Fishlock Date: Fri, 28 Aug 2026 20:46:55 +0200 Subject: [PATCH] Bump lyngdorf to 1.11.0 (#180528) --- homeassistant/components/lyngdorf/manifest.json | 2 +- homeassistant/components/lyngdorf/media_player.py | 14 ++++++++------ requirements_all.txt | 2 +- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/homeassistant/components/lyngdorf/manifest.json b/homeassistant/components/lyngdorf/manifest.json index 91b800d6aeb0..b4bd874ff4d3 100644 --- a/homeassistant/components/lyngdorf/manifest.json +++ b/homeassistant/components/lyngdorf/manifest.json @@ -9,7 +9,7 @@ "iot_class": "local_push", "loggers": ["lyngdorf", "async_upnp_client"], "quality_scale": "silver", - "requirements": ["lyngdorf==1.10.0"], + "requirements": ["lyngdorf==1.11.0"], "ssdp": [ { "deviceType": "urn:schemas-upnp-org:device:MediaRenderer:2", diff --git a/homeassistant/components/lyngdorf/media_player.py b/homeassistant/components/lyngdorf/media_player.py index 7bcb955d996d..e0a69c4d4989 100644 --- a/homeassistant/components/lyngdorf/media_player.py +++ b/homeassistant/components/lyngdorf/media_player.py @@ -298,10 +298,9 @@ class LyngdorfMainDevice(LyngdorfDevice): """Return the state of the device.""" if not self._receiver.power_on: return MediaPlayerState.OFF - if (now_playing := self._now_playing) is not None: - if (state := PLAYBACK_STATES.get(now_playing.state)) is not None: - return state - return MediaPlayerState.ON + if (now_playing := self._now_playing) is None or now_playing.state is None: + return MediaPlayerState.ON + return PLAYBACK_STATES.get(now_playing.state, MediaPlayerState.ON) @override @property @@ -349,9 +348,12 @@ class LyngdorfMainDevice(LyngdorfDevice): @property def media_position(self) -> int | None: """Return the position of the current track, in seconds.""" - if not self._has_streamer or not self._receiver.has_position: + if ( + not self._has_streamer + or (position_ms := self._receiver.position_ms) is None + ): return None - return round(self._receiver.position_ms / 1000) + return round(position_ms / 1000) @override @property diff --git a/requirements_all.txt b/requirements_all.txt index 560a4a9d97bf..23ba7803a5d8 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -1556,7 +1556,7 @@ lw12==0.9.2 lxml==6.1.2 # homeassistant.components.lyngdorf -lyngdorf==1.10.0 +lyngdorf==1.11.0 # homeassistant.components.matrix matrix-nio==0.26.0