core
core copied to clipboard
Google Cast Integration doesn't detect paused state when cast from HA
The problem
HomeAssistant doesn't detect when something cast to a Google Nest Hub (gen 2) as paused when initiated from Home Assistant.
Replicate:
- Cast dashboard to screen
- Media State updates to playing (correct)
- Swipe away dashboard, still "playing" (should be "paused")
Expected behavior:
- Cast youtube/etc to device from phone/etc
- Media state updates to playing (correct)
- Swipe content away on screen, media state updates to "paused", (correct)
Not sure why but when casting from HA, it doesn't detect paused state (see screenshot) - is this intended behavior? I attached the affected script I'm using, but affects anything else that is relying on state not being "playing" when it's not.
What version of Home Assistant Core has the issue?
core-2022.4.7
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Google Cast
Link to integration documentation on our website
https://www.home-assistant.io/integrations/cast/
Diagnostics information
No response
Example YAML snippet
trigger:
- platform: state
entity_id: media_player.nesthub51a4
to: 'off'
for: '00:00:20'
- platform: state
entity_id: media_player.nesthub51a4
to: paused
for: '00:00:20'
- platform: time_pattern
minutes: /9
- platform: time_pattern
minutes: '0'
action:
- choose:
- conditions:
- condition: or
conditions:
- condition: state
entity_id: media_player.nesthub51a4
state: 'off'
- condition: state
entity_id: media_player.nesthub51a4
state: paused
for: '00:00:20'
sequence:
- service: media_player.volume_mute
data:
is_volume_muted: true
entity_id: media_player.nesthub51a4
- service: media_player.turn_off
data:
entity_id: media_player.nesthub51a4
- delay:
seconds: 2
- service: media_player.turn_on
data:
entity_id: media_player.nesthub51a4
- service: cast.show_lovelace_view
data:
view_path: dining-room
dashboard_path: lovelace
entity_id: media_player.nesthub51a4
- service: cast.show_lovelace_view
data:
view_path: dining-room
dashboard_path: lovelace
entity_id: media_player.nesthub51a4
- delay:
seconds: 10
- service: media_player.volume_mute
data:
is_volume_muted: false
entity_id: media_player.nesthub51a4
id: '1650506777972'
alias: Cast Dashboard to Dining Room Nest
description: ''
Anything in the logs that might be useful for us?
Additional information
No response
cast documentation cast source (message by IssueLinks)
Hey there @emontnemery, mind taking a look at this issue as it has been labeled with an integration (cast
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
Let me know if there's anything you want me to test/try
Home Assistant relies on the chrome cast device signalling that it's been paused.
Please enable the logs below, then share a log file where the problem is reproduced.
logger:
default: info
logs:
homeassistant.components.cast: debug
homeassistant.components.cast.media_player: debug
pychromecast: debug
pychromecast.dial: debug
pychromecast.discovery: info
pychromecast.controllers.media: debug
pychromecast.socket_client: debug
homeassistant.components.zeroconf: debug
zeroconf: info
Added log to initial ticket, although can't see any media status for any of the cast devices, just CONNECTING/CONNECTED?
The device in question is media_player.nesthub51a4
I grabbed the logs after swiping off, "pausing", the HA Dashboard Cast to the Nest Hub.
I can try and grab another log when streaming from a different source? Or when actually dismissing the cast completely?
Just to throw more weirdness into the mix. Here's me manually streaming my cameras to the device from home assistant. The stream while choppy does work and play. But as you can see home assistant thinks it's paused
Here's YouTube from my phone. So home assistant is for sure getting state updates, very fast infact.
I'm wondering if the home assistant cast implementation is off? Trying to think of other experiments to do.
I have a Google Nest Hub v2 and can confirm that Home Assistant does not show the cast Lovelace/dashboard as paused when you swipe away.
not sure if related but i see more differences between v1 and v2, streaming (rtsp) cameras via lovelace is only working on V1s and not V2s
Bump, @emontnemery if you need a Nest to test I'm happy to send you one.
Also from what I understand, this uses the Cloud service to cast to these devices, is there a way to test casting directly from HA?
Just tested this with a Google Hub Max, same issue. Not sure what other info you guys need?
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
This is still very much an issue
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
This is still an issue
Agreed that this is still an issue. If this worked it would be so much easier to make the dashboards more reliable.
This has gotten better for me. I need to check if HA is getting state updates for me now.
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
This is still an issue on the latest version
Confirming I'm still seeing this issue as well.
@emontnemery I added the log lines you suggested above and when I dismiss the UI on the screen, nothing shows up in the logs. Interestingly, even after the UI has been dismissed, the regular discovery log lines appear to show it still casting,
2023-11-11 09:29:54.210 DEBUG (MainThread) [homeassistant.components.zeroconf] Discovered new device google-nest-hub-<snip>._googlecast._tcp.local. ZeroconfServiceInfo(...<snip>... properties={'rs': 'Casting: Home: Thermostats', ...<snip>... })
Happy to provide more detailed log lines or anything else that might help debug.
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
Not fixed yet.
~~Seems to be fixed as of 2024.3.1
. Can anyone else confirm?~~
EDIT: Nope. I was just being stupid 🤦