core: YouTube not updating media player state correctly

The problem

At some time after 2024-02-06 7:08 AM (Central Time), the Cast integration stopped reporting the media player state correctly, at least when using with a Chromecast with Google TV. Specifically, the state of the media player stays as Idle even when YouTube is playing, and the media_artist no longer shows the channel being watched.

I have also observed that the media-control card no longer updates the state correctly when YouTube is playing (which I assume is due to the same root cause):

image

It does know that YouTube is open, just not that it is playing and what it is playing.

I believe this stopped working on its own, unrelated to any Home Assistant updates I did. To verify, I tried rolling back from 2024.2 to 2024.1.6 and 2024.1.5, which I had been running before, and it did not resolve this. I think this rules out https://github.com/home-assistant/core/pull/108073 being the cause, and probably indicates that something changed on the Chromecast or YouTube’s end and perhaps something needs to be updated to make this work again, if that’s possible.

I also tried power cycling my Chromecast device, but that did not help either.

I have attached a YAML snippet of the state of the media player that I see when YouTube is playing.

What version of Home Assistant Core has the issue?

2024.2.1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

cast

Link to integration documentation on our website

https://www.home-assistant.io/integrations/cast/

Diagnostics information

No response

Example YAML snippet

volume_level: 1
is_volume_muted: false
media_content_type: video
media_position_updated_at: "2024-02-09T18:58:10.005881+00:00"
app_id: 2C6A6E3D
app_name: YouTube
entity_picture_local: null
friendly_name: Living Room TV
supported_features: 152449

Anything in the logs that might be useful for us?

No response

Additional information

No response

About this issue

  • Original URL
  • State: open
  • Created 5 months ago
  • Reactions: 3
  • Comments: 26 (1 by maintainers)

Most upvoted comments

Starting this morning, YouTube started showing the state correctly again for me.