Looking to create an automation for casting a dashboard when the TV is turned on. The purpose is to always display a dashboard on the TV (through Google Cast) when it is not being used for anything else.
When the TV is on, I am able to successfully cast my /lovelace/home View by doing the following:
Going here by clicking “Media” and selecting “TV”:
/media-browser/media_player.living_tv
And then clicking the “Dashboards” tile and selecting “Default”.
This was my last attempt at the YAML, working with claude.ai to troubleshoot/refine:
alias: Auto Cast Dashboard on TV Power On
triggers:
- entity_id: media_player.living_tv
to: "on"
trigger: state
actions:
- delay:
seconds: 10
- action: cast.show_lovelace_view
data:
dashboard_path: home
entity_id: media_player.living_tv
view_path: "0"
mode: single
The “url” for the default/home view is “home” per the view config settings.
When I “Run action” on the “Google Cast: Show dashboard view” nothing happens on the TV.
Just trying to figure out what code is behind the manual process of pushing the dashboards to the TV via the media user inferace…
References: