home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
72.1k stars 30.18k forks source link

Google Cast Cast.show_lovelace_view broken #112717

Closed kwkid closed 6 months ago

kwkid commented 7 months ago

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.

bdraco commented 6 months ago

Changes targeted for 2023.3.2 2024.3.2

smarthomefamilyverrips commented 6 months ago

Thank you! 🙏

celindho commented 6 months ago

Changes targeted for 2023.3.2

2024.3.2?

joachimcarrein commented 6 months ago

confirmed fixed in 2024.3.2 thanks!

jeroenvdd commented 6 months ago

Confirmed as working here too

mfabiani53 commented 6 months ago

i see it is fixed, but on my Nest Hub i get "connected" and then only a blank screen, while, using the cast option from my Panasonic TV i can see the dahsboard... Anyone else has this behaviour?

NHMikeG commented 6 months ago

Casting the Lovelace dashboard view appears now to be fixed in 2024.3.2 and 2024.3.3. However, now the webrtc dash casting appears to be broken. This was working prior to 2024.3.2. Sample YAML below.

I see this issue is Closed. I will submit a new Issue.

service: webrtc.dash_cast metadata: {} data: entity_id: media_player.nesthubmaxced5 entity: camera.mud_room_door_fluent force: true

Daniel-Vitanza commented 6 months ago

Hello

In my case, it seems that the problem is still there. (or maybe it is something else...but I don't find what).

I can cast my reolink camera streams, pictures stored in HA, etc. But not the dashboard.

image image

Log Error:

Logger: homeassistant.components.websocket_api.http.connection Source: components/lovelace/cast.py:185 integration: Home Assistant WebSocket API (documentation, issues) First occurred: 5:21:32 PM (10 occurrences) Last logged: 5:41:39 PM

[548308570048] Error handling message: Unknown error (unknown_error) Danny from 192.168.1.30 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36 Edg/121.0.0.0) Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 27, in _handle_async_response await func(hass, connection, msg) File "/usr/src/homeassistant/homeassistant/components/media_player/init.py", line 1312, in websocket_browse_media payload = await player.async_browse_media(media_content_type, media_content_id) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/cast/media_player.py", line 660, in async_browse_media browse_media = await platform.async_browse_media( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/lovelace/cast.py", line 83, in async_browse_media info = await _get_dashboard_info(hass, url_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/lovelace/cast.py", line 185, in _get_dashboard_info for idx, view in enumerate(config["views"]):


KeyError: 'views'
william-sy commented 5 months ago

@Daniel-Vitanza Please open a new ticket.

Daniel-Vitanza commented 5 months ago

Issue solved this morning with the latest update 2024.4.2

talormanda commented 5 months ago

Issue solved this morning with the latest update 2024.4.2

Was it actually resolved in the update notes or are you just reporting that it works better after you updated?

Daniel-Vitanza commented 5 months ago

Both.

1)It works better as I am now able to see the dashboard selection window for casting instead of the error message. And casting the dashboard just works too.

2)And I found this in the release notes of the 2024.4.1 ;) image