mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
Fix mpd time issue (#30825)
* Fix mpd time issue * Update homeassistant/components/mpd/media_player.py Co-Authored-By: Franck Nijhof <git@frenck.dev>
This commit is contained in:
parent
9d5a391916
commit
bef8600972
@ -133,8 +133,8 @@ class MpdDevice(MediaPlayerDevice):
|
|||||||
self._status = self._client.status()
|
self._status = self._client.status()
|
||||||
self._currentsong = self._client.currentsong()
|
self._currentsong = self._client.currentsong()
|
||||||
|
|
||||||
position = self._status["time"]
|
position = self._status.get("time")
|
||||||
if self._media_position != position:
|
if position is not None and self._media_position != position:
|
||||||
self._media_position_updated_at = dt_util.utcnow()
|
self._media_position_updated_at = dt_util.utcnow()
|
||||||
self._media_position = position
|
self._media_position = position
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user