I’ve been programming this for the past day in YAML. It’s working 80% of the time for me, and it shows the lovelace view!!! The script I’m using to get this working is as below (note the use of single quotation marks around the view number. Did this as I couldn’t get URL path name working).
Give my YAML code a try and it’ll hopefully work for you too. I’m on Hassio v0.104.4
Having the same issue however found that if I start up https://cast.home-assistant.io/, select the target (media player) but not the ‘Source’ (the lovelace view/path), I can cast whatever I want either manually or through automations.
The https://cast.home-assistant.io/ interface also mirrors what ‘Source’ is being viewed/cast. It’s not perfect but should work ok.
My problem is still that we need to authorize through cast.home-assistant.io, which is a manual process. I really hope that it can be automated somehow, so we just have to call the ‘cast.show_lovelace_view’ and the path needed.
Then I need your expertise … I Simply can’t get it working without.
So without doing anything you can just go to the develop tool, services and select the ‘cast.show_lovelace_view’ and then call the entity of your nest hub using the View either by name or number?
So I was excited to get home and try your approach and… voila, it worked on the very first try.
Unfortunately I kept it running over night, and this morning when I wanted to try again - same script, it “failed”. It shows the Home Assistant luvs Nabu Casa and then it says ‘Connected’. While that might be true, it still doesn’t show the lovelace view I want to cast.
So once again I have to open a Browser, head to cast.home-assistant.io and authorize and cast a lovelace view. When that is done, then I can fire your script and it will work. Also with different views - probably until the authorization is “expired”
I was having the same problems. I gave up using the cast.show_lovelace_view service. Instead I use CATT : Using CATT and it has been working just great.
I have now waited for more than one hour and it still shows the luv screen and ‘Connected’.
So there must be something else wrong.
Do I need to set up some auth_trust to leave out the authorization process with cast.home-assistant.io, could that be it or don’t you have that in your conf?
Same results for me, while using Nabu Casa, but having your own reverse proxy doesn’t make any difference either. Casted through front-end and through https://cast.home-assistant.io/ gives the same result.
I am only able to fire up “HOME” which doesn’t reflect the HOME i built earlier. Any other page (even with numbers in path/url) ends up with “Error: Unable to find a view with path X”.