Small automation that casts a lovelace view to a Google Hub (or any Chromecast device for that mattter) when the hub is not playing anything. It re-casts the same view every 9 minutes to compensate for the fact that the hub automatically goes into picture frame mode after 10 min.
For this to function you need have the lovelace cast setup:
Have HTTPS setup on your HA install
Make sure you HA is accesible from the internet via HTTPS and also check in Configuration -> General (the external URL)
Thanks for sharing! Used the blueprint to create an automation (needed some tweaking for my conditions) but the base of it is per your blueprint. Its nice to get back to using the native cast function.
For the theme, do you have a separate view to be casted? I specified the theme for the view and its working nicely for me.
Indeed, but the blueprint only checks for off and paused states, all other states are treated as the hub is doing something else and won’t re-cast. So probably during duo calls it’s one of those. Or maybe the state during duo calls does not properly update in HA ?
Then maybe it’s better to file a bug on github so that the chromecast team can look into it, maybe there is an update sent but not processed by the integration.
This looks really cool, but I just get a black screen with the blue cast logo on my hub. I assume I have the path or dashboard fields wrong. Would anyone be able to share an example of what those fields should look like?
Make sure you have the right prerequisites for casting (HTTPS and authentication on the cast portal). You can manually test with service cast.show_lovelace_view to double check.
If your parameters were wrong you would still get an image with the HA and Nabu Casa logo and some error.
Thanks for all of that. Cast portal is logged in, but it does say “There were no suitable Chromecast devices to cast to found.”. Which is odd giving all the cast devices I have, plus I can ask Google assistant to stream cameras from HomeAssistant and that works.
I do have this error in the log “Failed to cast media https://www.home-assistant.io/images/cast/splash.png. Please make sure the URL is: Reachable from the cast device and either a publicly resolvable hostname or an IP address”
Can you cast any browser tab (or even desktop) from Chrome (the three dots menu -> Cast…) ? Is the Hub visible in the list of the HA Cast integration ?
Then I guess your HA is not accessible from the internet via HTTPS. Or maybe the URL is not properly set. Check in Configuration -> General (the external URL).
You are good.
“Configuration -> General” was empty and said it was referenced in configuration.yaml.
I checked my configuration.yaml and it too was missing the external URL.
I put the external URL in there, rebooted, and now I at least get the white NABU CASA splash page when I cast.
I can’t believe that wasn’t in my config. Probably had other thing broke because of that.
Thanks for the help!
Could you perhaps help me out with an example? I love the idea behind the blueprint, but somehow I am not able to get it to work. (amongst others) I have tried the following config:
For Lovelace view path I have selected: https://XXXXXXXXX.duckdns.org/lovelace/lovelacecast
and i kept Lovelace dashboard blank.
I’ve also tried adding the port (8123 and 443), but it wont work.
what am i doing wrong?
many thanks,
BI,
PS. the error i get on the google home is the casa nabu screen with the error message:
“not connected”
“error unable to connect to the home assistant websocket api”