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
881b35f9d6
commit
5b51f740df
1 changed files with 2 additions and 2 deletions
|
@ -133,8 +133,8 @@ class MpdDevice(MediaPlayerDevice):
|
|||
self._status = self._client.status()
|
||||
self._currentsong = self._client.currentsong()
|
||||
|
||||
position = self._status["time"]
|
||||
if self._media_position != position:
|
||||
position = self._status.get("time")
|
||||
if position is not None and self._media_position != position:
|
||||
self._media_position_updated_at = dt_util.utcnow()
|
||||
self._media_position = position
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue