Cast and re-cast a lovelace view to a Google Hub

I just purchased a Google Nest Hub to use with this and I’m also running into the 10s loop issue. Seems like if it worked as it used to this would be fantastic!

1 Like

You should no longer use this Blueprint, the Cast app has been updated to prevent timing out, and a re-cast should not be needed.

At least the trigger on paused should be removed, as the Lovelace app will have a paused state now when active.

  - platform: state
    entity_id: !input 'player'
    to: paused
    for: 00:00:20
2 Likes

I just switched to the default HA “cast.show_lovelace_view” service yesterday. It seemed like it was still timing out at first, but I think I may have resolved that by rebooting the Google Home.

I’m wondering what the recommended trigger is for this now though if re-casting is no longer necessary? I currently have a Time Pattern trigger setup to run every 10 minutes, but now I’m wondering if it should be run less frequently?

What’s the best path forward? Modify existing blueprint, create new one, or brand new automation?

Curious what others who have this up and running are doing.

I disabled the automation that uses this blueprint and created a new automation. As I posted above, I’m not sure if my time frequency is optimal, but so far it seems to be working fine and the HA screen is still up after nearly a full day. Here’s my automation if it helps, of course you’d need to customize the 3 items under “data” to match your setup.

alias: Cast to Google Hub - B
description: ''
trigger:
  - platform: time_pattern
    minutes: /10
condition: []
action:
  - service: cast.show_lovelace_view
    data:
      entity_id: media_player.kitchen_display
      dashboard_path: lovelace-displays
      view_path: kitchen-display
mode: restart
1 Like

You don’t need the

  - platform: time_pattern
    minutes: /10

it will stay active as long as nothing else is casted/the casting is actively stopped, or the device reboots (Google does that at night) so just starting it at night after the reboot should be enough

1 Like

The next version of Home Assistant (2021.12) will change the state from paused to casting when Lovelace is active, so then this blueprint will work again… until then removing the paused trigger, or change it to a from: playing, to: paused, should do the trick.

1 Like

Apologies to some of you for posting the same info here and Github…

When I try to run the service from developer tools, I get the ‘HA <3s Nabu - Connected’ screen, and then nothing. No lovelace view, nothing.

This is what I’m running. What am I doing wrong?

service: cast.show_lovelace_view
data:
  dashboard_path: lovelace-room
  view_path: cast
  entity_id: media_player.kitchen_hub

Is your Home Assistant installation accessible via https:// ?

Yes, using Nabu

Thanks. Created my own automation like this, but something just isn’t working now. I now am getting the error that indicates it’s unable to find the path of my dashboard.

HA <3 Nabu Casa
Connected
Error: Unable to find a view with path

But if I re-run the automation from the BluePrint in this thread, it works…just gets continual reloads more frequently than before.

Is this related to the change coming next month? Any suggestions or ideas as to what’s going on?

UPDATE - now this automation is no longer working for me at all. It seems that Cast has stopped completely for me. Any ideas what’s going on?

Have been pulling my hair out on this one as checked and rechecked, finally figured it out you need to put “path” not path use the yaml editor to do this as the GUI will remove the “” i.e. my script yaml looks like this

alias: Cast Cam to Chromecast
sequence:

  • service: media_player.volume_mute
    data:
    is_volume_muted: true
    entity_id: media_player.kitchen_display
  • service: media_player.turn_off
    data:
    entity_id: media_player.kitchen_display
  • delay:
    seconds: 2
  • service: media_player.turn_on
    data:
    entity_id: media_player.kitchen_display
  • service: cast.show_lovelace_view
    data:
    entity_id: media_player.kitchen_display
    dashboard_path: “lovelace”
    view_path: “Rear”
  • delay:
    seconds: 10
  • service: media_player.volume_mute
    data:
    is_volume_muted: false

dashboard path should be “lovelace” unless you changed it, check in your browser what the url of the view is in my case //lovelace/Rear , View Path is set to view url (set this in view configuration) under URL (optional).

Only issue I have now is that while it shows the picture entity card I have it’s showing as blank, I beleive this may be timeout related on the cameras as I have seen this before in the Android app as well just shows the card as a big play button.

Hope this helps

1 Like

Thanks for this. Will we have to make another change after 2021.12?

1 Like

For me the same, the cast isn’t working for a long time. Someone have ideas how to get this thing running?

1 Like

hey guys,

I tried this with my cast but the problem is, that the cast is in screensaver mode after a while. anyone an idea? bought this device only for that usecase and if it is not well supported I would rather think to return the device.

- alias: "Cast to Google Hub"
  trigger:
    - platform: time_pattern
      minutes: /9
  action:
    - service: media_player.volume_mute
      data:
        is_volume_muted: true
        entity_id: media_player.flur
    - service: cast.show_lovelace_view
      data:
        view_path: nest
        dashboard_path: lovelace
        entity_id: media_player.flur
    - delay:
        seconds: 10
    - service: media_player.volume_mute
      data:
        is_volume_muted: false
        entity_id: media_player.flur
  mode: restart

Best,
Dirk

1 Like

Cast is working now. Just read back some comments above: Cast and re-cast a lovelace view to a Google Hub - #73 by Bram_Kragten

1 Like

Stays the same like I mentioned above and this issue also states the problem people are describing here. Google Cast stopped working within the last couple of weeks · Issue #53882 · home-assistant/core · GitHub

1 Like

Hi guys, I am trying to cast the my lovelace calendar to my Google Hub, I’ve finally managed to get it up on the Hub, but its empty while everything is showing in HA before I cast it. Anyone got any idea what the issue could be or how I could fix that?

I got it working. I just simply cast with a script and dont use the automation that re-triggers casting every 9 or 10 minutes and that works good.

sequence:
  - service: media_player.volume_mute
    data:
      is_volume_muted: true
      entity_id: media_player.flur
  - service: cast.show_lovelace_view
    data:
      view_path: nest
      dashboard_path: lovelace
      entity_id: media_player.flur
  - delay:
      seconds: 10
  - service: media_player.volume_mute
    data:
      is_volume_muted: false
      entity_id: media_player.flur
mode: single

Hi Dirk,

So you’re not using CATT? I tried using CATT with 10 minute automations, but I could not get it to work reliably enough.