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.
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.