Combined the script and automation in a package, see the setup section on how to update. Remove the old scripts and automation first, and do a reload from Developer Tools > YAML before copying the new version to your system.
You will need to update the Google Home Voice and Google Home Event scripts as well if you update to this version.
Improvements
Changed version number to YYYY.MM.version
As the automation is now included in the package, a variable automation_enabled is added to optionally disable the automation. It is enabled by default
Sometimes Cast devices can show as idle in Home Assistant, while they are actually playing music from Spotify. They will also be resumed now
Templates to store data are improved, variables to store Spotify and YouTube Music data are now integrated in the general player data variable
Some variables which can be useful for debugging are added
Hi TheFes,
after upgrade both scripts (2022.11.1; resume + event) via pacakges, Resuming is not working correctly (but no error in the log), and following error occurs if I restart the HA:
Invalid config
The following integrations and platforms could not be set up:
automation (Show logs)
Please check your config and [logs].
The automation from the package is not created; I wanted to create it myself directly via automations, but it is with some error, therefore not able to saveā¦
Hmm, without errors this is a bit tricky to debug.
Is there anything which might be related if you donāt filter on automations only (the link from the log automatically applies a filter).
What I can imagine is that you didntāt remove the old automation, and that there is a conflict with the unique_id now.
Do you also have 2 Google Home Resume scripts, and 2 Helper scripts now?
I deleted old 2 scripts, so now I have only 2 new not-editable scripts.
Automation - I did not have old one you have in package and it is not generated under automation section.
I call the scripts within my own automations.
If I unfilter logs, no errors.
Were you already using packages, or did you use the include as described in the setup instruction? If you were already using it, what is the include you are currently using?
I am still using the previous versionā¦i have a questionā¦on the google device that I have in my office, probably it is connected a second profile for google as well as for spotify (here I am not sure).
Looking at the home assistant dashboard, I can see the music which the google device is playing, but the spotify banner with my account is not active, so I suppose that the google device is using another spotify account. If I start the script, it sends the tts message, and when it tries to resume, it does not work properly (I am not sure, one time it resumed a song which usually I hear on my account).
Anyway, from the generated trace files, can I understand what is eventually the spotify user(or spotcast)?
If you have only one Spotify account integrated in Home Assistant, and you configed spotcast for only one account, that account will be used to resume Spotify.
If you are in fact using multiple Spotify accounts, you need to integrate that Spotify account as well. So that means that you need to add the Spotify integration a second time for that account, and that you need to change the spotcast settings so that account can be used as well.
Just to be sure that I am in the right direction. To add the second account, I need to open the developer spotify website and add the new user in user and access, is it correct? Here it is written that I can add 25 users and that zero have been assigned at the time being. The mine is the default one and I do not need to add it in this list, am I right?
I have configured everything as in the instruction.
Anyway, I cannot find the info where to put the additional created user info in the script. I suppose it is somewhere under primary_spotcast, but what should I add?