End of Spotify playlist/album not changing state of (chromecast) media player

Probably not an Home Assistant issue, but you people are all very knowledgable, so may be able to help. I don’t use any Spotify integration btw, only an android Spotify app and the Chromecast devices as (cast) media players.

This behaviour only started to happen recently. Not sure whether it’s a Spotify or Google Cast issue.

When I play a Spotify playlist or album from my Android Spotify app via Spotify connect on a Chromecast device (Chromecast Audio, Lenovo Smart Clock, Chromecast) and the playlist finishes, this is not reported to the Chromecast. The Chromecast device remains on the state “playing”. When I pause a song myself, this works just fine and the chromecast device goes to paused as well. When I play an album that contains only 1 song, all is fine as well. The status of the player goes to pause after playing it.

The is very annoying, since I have automation associated with it, to turn off speakers when no Spotify is playing. This used to work fine, but something changed and this behaviour started to manifest itself.

Anyone can confirm this happening? And where the root cause lies, Chromecast or Spotify?

I assume a workaround would be to also add the Spotify integration and monitor state there?

Update: Mmm, the media player actually goes to paused and then quickly after (within 1 sec) back to playing???

Seriously, what the hell is going on??? Could this be caused by a wrong network setting? I recently upgraded from Unifi 5 to 6?

Downgrading to latest Unifi 5.x didn’t fix it. Using older apks for both Spotify and Google Home also didn’t do anything. I’m at a total loss here :frowning:
Only option I see left is factory resetting all my cast devices.

But I cannot image what is the thing that changed somewhere the past few weeks to introduce this behaviour. Chromecast Audio is EOL, so I cannot imagine a Chromecast wide firmware update is causing this.

The player continuously keeps on bouncing from playing to idle to paused to playing, then stays on playing for a few seconds and then again goes through paused, idle, playing.