But I get an error stating ‘Unable to find a view with path Lights’. I’m assuming the path is a Tab name in Lovelace UI? I have tried some of my other Tab name, and get the same error. What am I doing wrong??
Update: When I cast a path of 0,1,2,3 etc, the corresponding "non-lovelace’ view shows ok.
Maybe you need to somehome set Lovelace as the default view or something first on the device?
Or maybe it doesn’t work in with lovelace .yaml mode?
I’m just wildly speculating…
Mine starting working using your approach after i also reauthorised via https://cast.home-assistant.io/ . It only works for the views where I’ve done as you’ve suggested…
When starting the cast from the cast.home-assistant.io site and then using the cast.show_lovelace_view command with lovelace maps the function is working.
But when starting the launcher directly from the command " cast.show_lovelace_view " then i can only use the “states” views. Lovelace views will say "Error: Unable to find a view with path "
Same with me. I have tried all combinations: /lovelace/name_of_the_view, /name_of_the_view, with or without starting slash or ending slash, nothing. And the manual cast (the one from 98.x) still works fine.
I have an additional question - how to stop casting the view from a service. Is it possible? I know I can stop the cast from media_player service - is it correct way to do this?
I also can’t get this to work. The error goes away but I just get the Home Assistant love Nabu Casa logos and it shows “connected” but that’s it. It never shows a view.
Not sure what you mean by automations? I had a quick play in Node Red, as an automation to get the cast started and it worked easily using
call service node, the right device and this as the data:
I confirm the problem too. It only works if you previously get authorised via https://cast.home-assistant.io/ , or it can cast “old” views, but not Lovelace views.
Hopefully this will get fixed
Ok, I understand now. I think so far in my limited testing you only have to connect once the ‘old way’ and then the cast function from the front end seems to work thereafter every other time. I suspect and will need to test, if the ‘old way’ via the URL will need to be used once again after a restart of Chromecast device before can use the front end?
I had it working via the front end, but when it ran from an automation it failed. Do I need to authorize it via the raspberry pi it is running on? If so, that will require me to install the desktop tools and chrome and I am running the pi in minimal mode.
I can confirm what you are saying @vasseurf.
If i cast using https://cast.home-assistant.io/ the correct views are shown and with the latest configs.
But if i use developer tools or with an automation, i can only get defalut_view to work, and some really old version of it aswell.
I have tried both with yaml-mode and normal config-mode, same result when using developer tools.