mirror of
https://github.com/home-assistant/core.git
synced 2025-07-26 06:37:52 +00:00
Fix Spotify deviding None value in current progress (#76581)
This commit is contained in:
parent
dbfba3a951
commit
6e65cb4928
@ -179,7 +179,10 @@ class SpotifyMediaPlayer(MediaPlayerEntity):
|
|||||||
@property
|
@property
|
||||||
def media_position(self) -> int | None:
|
def media_position(self) -> int | None:
|
||||||
"""Position of current playing media in seconds."""
|
"""Position of current playing media in seconds."""
|
||||||
if not self._currently_playing:
|
if (
|
||||||
|
not self._currently_playing
|
||||||
|
or self._currently_playing.get("progress_ms") is None
|
||||||
|
):
|
||||||
return None
|
return None
|
||||||
return self._currently_playing["progress_ms"] / 1000
|
return self._currently_playing["progress_ms"] / 1000
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user