mirror of
https://github.com/home-assistant/core.git
synced 2026-09-04 04:22:09 +01:00
Bump lyngdorf to 1.11.0 (#180528)
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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
|
||||
|
||||
Generated
+1
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user