Cast HA dashboard on nest hub without keep running a desktop browser

hello,

I got a google nest hub I did the authorization from my laptop browser so now I can cast the dashboard triggering it from laptop browser or from mobile app, my problem is that I cannot cast from an HA automation or script, if the Chrome browser on my laptop is not running the HA cast panel show me an error message unable to show <path>.

maybe I’m missing something I cannot use the cast just if the browser on the laptop is up and running.

This is for triggering it from an automation, when ha starts or the nest hub stops playing. it has a double cast function because custom dashboard are not functioning correctly at this moment but this is a solid workaround. if you want the default lovelace view cast you can remove the double cast and delay and just put the view_path: ‘0’ in.

- id: '1591682005536'
  alias: Test Nest Hub
  description: ''
  trigger:
  - event: start
    platform: homeassistant
  - entity_id: media_player.hub_huiskamer
    platform: state
    to: 'off'
  action:
  - data:
      entity_id: media_player.hub_huiskamer
      view_path: begane-grond
    service: cast.show_lovelace_view
  - delay: '00:00:05'
  - data:
      dashboard_path: nest-hub
      entity_id: media_player.hub_huiskamer
      view_path: begane-grond
    service: cast.show_lovelace_view