Ah, without a media_content_id there isn’t much I can do.
I gave it a try with the cast functionality and the app_name and app_id you gave above, but that did not work.
(Limited) support for YouTube and YouTube music. The active video/song will be resumed at the position (minus 2 seconds) when it was interrupted. However, it will only resume that video/song. Not the full playlist/album/whatever.
Fix in template where speaker groups were not seen as cast entities.
and the media_players connected to the Spotify integration are named (matching the spotcast configuration and the primary_spotcast variable in the script):
Oh, one thing. It is not possible to immediately send it to the right position. So it will first start at the beginning of the video, and after a short delay move to the right position.
Today I had some time to test the new script out. It works like a charm depending the resume option for Youtube. The media_position is not working yet. I get the following error:
Logger: homeassistant.components.script.google_home_resume
Source: helpers/script.py:1375
Integration: Script (documentation, issues)
First occurred: 11:44:39 (16 occurrences)
Last logged: 11:50:16
00 🔊 Google Home Resume: Anything to resume?: choice 1: Resume players: Resume needed?: choice 1: Resume playing: YouTube?: Error executing script. Error for call_service at pos 4: Error rendering data template: UndefinedError: 'media_position' is undefined
00 🔊 Google Home Resume: Anything to resume?: choice 1: Resume players: Resume needed?: choice 1: Error executing script. Error for choose at pos 3: Error rendering data template: UndefinedError: 'media_position' is undefined
00 🔊 Google Home Resume: Anything to resume?: choice 1: Resume players: Error executing script. Error for choose at pos 2: Error rendering data template: UndefinedError: 'media_position' is undefined
00 🔊 Google Home Resume: Anything to resume?: choice 1: Error executing script. Error for repeat at pos 1: Error rendering data template: UndefinedError: 'media_position' is undefined
00 🔊 Google Home Resume: Error executing script. Error for choose at pos 9: Error rendering data template: UndefinedError: 'media_position' is undefined
Yeah I copied the new script on github after your last post. I start the youtube cast on the Nest Hub, and called the TTS with your script. It stops, played the TTS and returned to Youtube. But then it gave me an error that it couldn’t find the media_position. The youtube video just started from the start.
How do I configure players with a screen? I understand I need to add the file directory in ‘fixed_picture’ but is it a case of downloading the image to the stated directory and that image will show when resumed?
If so, is this just for radio or for Spotify artists too?
Those fixed_pictures are not related to the players with a screen.
I’ve put that in because many radio stations on TuneIn use the album art for the song which is playing as the entity picture.
That will not work after resuming, as it is not playing via TuneIn anymore. So, without the fixed_picture you will be stuck with the picture of the song when the stream was interrupted.
I’ve added fixed pictures for the TuneIn streams I use frequently to avoid that.
For Spotify it’s not an issue, as Spotify will be still playing and updating the pictures.
The players_screen variable is to make sure the backdrop is shown after it has been interrupted and nothing was playing.