core: Google Cast Cast.show_lovelace_view broken

The problem

The ability to cast a lovelace view via Google Cast is no longer working after updating to 2024.3.0 using cast.show_lovelace_view.

What version of Home Assistant Core has the issue?

Home Assisstant OS

What was the last working version of Home Assistant Core?

2024.2.5

What type of installation are you running?

Home Assistant OS

Integration causing the issue

cast

Link to integration documentation on our website

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

Diagnostics information

Nothing appears in the logs

Example YAML snippet

service: cast.show_lovelace_view
data:
  entity_id: media_player.nest
  view_path: message
  dashboard_path: lovelace

Anything in the logs that might be useful for us?

Nothing appears in the logs

Additional information

This maybe related to Bump pychromecast to 14.0.0 which was part of the 2024.3.0 release. Restoring HomeAssistant back to 2024.2.5 resolves the issue. The Google Cast screen displays, shows the ‘Connected’ prompt but stays on the splash screen never showing the lovelace view until it times out and exits. This was done on my Google Nest Hub.

About this issue

  • Original URL
  • State: closed
  • Created 4 months ago
  • Reactions: 19
  • Comments: 57 (6 by maintainers)

Most upvoted comments

Changes targeted for 2023.3.2 2024.3.2

Just tested the .1 release too -> no bueno

Still not working here.

Also experiencing this. For some reason, manually calling the cast.show_lovelace_view service again (at least through the Developer Tools) will make the dashboard show. Calling it only once does not work. A bit annoying, as I have a dashboard auto cast when I turn on a room via a dimmer.

Noticed this same issue after updating to newest HA version from the previous one. Made a temporary fix by editing all the casting scripts to trigger the same cast command twice with a 10 second interval.

Could be.

Here HA runs in docker with NGINX proxy. Ill try the .1 update in a bit and see how it goes 😃

Edit: Update did not fix the problem

confirmed fixed in 2024.3.2 thanks!

Made a temporary fix by editing all the casting scripts to trigger the same cast command twice with a 10 second interval.

Thanks. I have got the temp fix working by adding my cast and wait commands to a repeat block

repeat: count: 2 sequence: - service: cast.show_lovelace_view data: entity_id: media_player.kitchen_hub dashboard_path: kitchen-hub view_path: default-view enabled: true - wait_template: “{{ is_state(‘media_player.kitchen_hub’, ‘playing’) }}” continue_on_timeout: true timeout: “10” enabled: true

done

Confirmed as working here too

@smarthomefamilyverrips

but nobody from core team seems to pick up this issue 🙄

Its been 2 weeks sure, But I have to disagree with your mindset. It’s opensource, feel free to fix it tomorrow if you like submit a PR you don’t have to wait for the core team.

I am sure there is a backlog / order of things / reason why it is not yet in the works. Would it be nice if they let us know? Sure would be, but if you have to update all the tickets you have no time for development.

So to conclude:

  • The workaround, as much as it is not a fix. It does help the developer in locating the problem, I don’t have any logs on my machine indicating / pointing toward what is wrong so this is helpful info and a good band aid for now if you rely on casting.
  • The information about the ‘media_title’ not being set the first time is interesting and also pointing towards the problem.

100% @smarthomefamilyverrips hit the nail on the head. A workaround should not be treated as a fix. The reality is that 2024.3 broke the casting functionality and it requires fixing, not workarounds. I had the same issue and had rolled back to 2024.2.X, will stay there until this is fixed - hopefully soon!

same issue here 😒Have had no success with the work around of looping the cast command.

You can also just add a simple delay like this: Screenshot 2024-03-18 at 10 11 38

Works too simple and effective.

Is the device you are trying to cast to showing available when not casting?

I have the problem since few weeks that my devices become unavailable in HA.

Yes, mine is available. What I observed is that upon the first cast, the media device turns on but the attribute “media_title: dashboard-nest: Home” is missing.

image

casting one more time and everything is good.

image

so i included this i a simple while loop and it works fine.

repeat:
  until:
    - condition: state
      entity_id: media_player.nest_display
      attribute: media_title
      state: "dashboard-nest: Home"
  sequence:
    - service: cast.show_lovelace_view
      data:
        entity_id: media_player.nest_display
        dashboard_path: dashboard-nest
        view_path: "0"
    - delay:
        hours: 0
        minutes: 0
        seconds: 2
        milliseconds: 0

Unfortunately, it still does not work at my site after the update to 2024.3.1. Also haven’t found anything in the releasenotes related to chromecasting.

Is this fixed with 2024.3.1 update?

Seems so. After one hour my Nest Hub still shows.

I hope this will be fixed soon. I cannot update to 2024.3 because of this bug.

Same problem here! I hope the issue will be fixed soon. 🔜