Media player - now_playing_url entity

It would be great to see among the media player states not only “play”, “pause” and “idle”, but also the last url sent to the device. This might help to solve the problem that on ESPHome based devices we can’t continue playing media files after calling tts services, because we lose information about what was last played before this event.
I realize that we can’t restore the last playback location of a particular media file (since we don’t know the last current position, that’s the next step), but at least we can reconnect to the stream by simply restarting it. To do this, we need to save the address of the stream. At least we will be able to see it in the media player card. Since tts messages are similarly passed to the speakers as url of the created media files, we will be able to track the playback of such messages as well. This would be helpful for automations in some cases.

Unfortunately, I am not an expert in programming, and perhaps I have not expanded my idea widely enough, but I hope the general idea is clear.

If you think it’s a good idea, you should vote for it. I did :ballot_box_with_check:
Suggested Reading:
More about Feature Requests.

What are the attributes of the player when playing?

If that’s what you meant


I can see it’s playing something or not, but can’t see what is playing.
In ESPHome logs i can see event when playback starts:>

[22:09:16][D][media_player:059]: ‘esp_speaker_1’ - Setting
[22:09:16][D][media_player:066]: Media URL: http://cast5.magicstreams.gr:8010/stream

This is the address of the media file or stream that I would like to see among the attributes. Obviously, it should be supported by the ESP speaker itself. As some kind of variable that could be used somehow.

Actually I’m concerned about the possibility of implementing resumption of media playback after tts announcements, since esp speakers don’t support the announce attribute.

Yes, other media players support this. Gets my vote.