I am trying to make a next track service for my plex, as it seems the next track is unsupported - seeking to a value works, but I would like to use the length of the current track as the seek position
I have tried various configurations of the following as I have managed to find all the info in attr info and tested the seek function with a plain text number.
I tried it with: seek_position: {{ state_attr(“media_player.floor_guy”,“media_duration”) }} and it came up with the error: Failed to call service media_player.media_seek. Error rendering data template: Result is not a Dictionary
Thanks - thought it would be something simple like this.
Is something like this possible too? Using the value of an input as part of the entity name. I have tried the following, but it does not seem to be writing the contents of the variable the way I wanted it to.
If I put {{ states('input_select.player') }} in a template by itself it writes the part of the media player name that is used in the original question.
Nevermind, tested myself and it seems to be working as expected. Thanks for the hint!
My complete scripts to go next or previous track for selected media player input_select.media_player, detecting if special seek is required when Plex is playing.