MPD media_player select track number

Does anyone know a way to jump to a specific track in an MPD playlist?

I’m using HA 0.100.3 on Docker connecting to a vanilla MPD Music Player Daemon 0.19.21 on Raspbian stretch. I have successfully implemented a script to load up and play a specific playlist by following the HA MPD instructions

Now I want to be able to do that, AND to play a specific track in the loaded playlist.

Looking at the MPD protocol there are commands like play [SONGPOS] and seek {SONGPOS} {TIME} that allow SONGPOS indicating the Entry in the Current Playlist (Queue), but I cannot see whether they are implemented in HA nor how to specify the data properly. Looking in the Service definitions play doesn’t seem to accept position data and I can’t see how to specify SONGPOS data to seek_position.

Has anybody been able to automate the selecting of a track in a playlist, specifically in MPD? Thanks.

This is the only way I have managed so far:

play_third_track:
  alias: Play Track Three
  sequence:
  - service: media_player.play_media
    data:
      entity_id: media_player.mpd
      media_content_type: playlist
      media_content_id: "My Playlist"

  - service: media_player.media_next_track
    entity_id: media_player.mpd
  - service: media_player.media_next_track
    entity_id: media_player.mpd

However it is annoyingly inefficient if I want track 20, and not always reliable.