Google Cast error - Unable to find a view with path xxxx

It’s not super clear but the problem is just unclear documentation.

I tried to do this with the cast.show_lovelace_view service and it did not work. I then went and authorized access through https://cast.home-assistant.io/ and was able to cast the views without issues. I then started poking around to better understand the view_path attribute. It turns out I had not updated my view id’s to view paths. This was probably something I missed in the migration to lovelace. So I just changed id to path in my config and now the cast command works as expected.

image

I tried to edit the docs but I’m a github noob. Help if you can: https://github.com/home-assistant/home-assistant.io/pull/11181

1 Like

It seems that the lovelace GUI editor is using path under the hood but it’s still not working as expected for me:

image

ACTUALLY

I hadn’t tried this since updating HA to 101… it seems to be working at the moment

I still have the same symptons a few of us isolated at the start of the thread:

Does anyone know if there is actually an active/dedicated issue raised for this on Github or if this is actually on the devs radar? How can we confirm?

3 Likes

I’ve seen this issue that is open:

Yes, I’ve commented on that one. https://github.com/home-assistant/home-assistant/issues/26758#issuecomment-533834408

But I think it’s a different issue?

So I’m still not sure there is a open issue for this?

I’ve raised an issue. Could few of you jump on and confirm you have the same issue?
Cheers.

5 Likes

Done and same issue here on 0.103.4.
Still no fix :sleepy:

2 Likes

Can people confirm that the Lovelace path are still not working???

It’s annoying however, in that case I’m just going to edit the “states” views rather than the “lovelace” views and that will give me what I need.

If it helps anybody, the “cast.show_lovelace_view” seems to be able to recognise the names of all my “group” (non-lovelace) view names as shown below (from the configuration.yaml file).

The service should be called “cast.show_states_view”!!!

image

Never got it to work properly. I try it every release hoping devs actually fixed it but…nope

I notice that immediately after rebooting Home Assistant it casts Lovelace “0” number views, but after a few minutes it revert to the States “0” number views. It’s very unreliable however, it works one minute then not longer recognises the state path, then later it works again!!! Too frustating!!!

Definitely a bug somewhere in the Cast Lovelace code. I hope someone fixes it, cause Lovelace is so much nicer than States views.

It’s annoying that lovelace views can’t be displayed reliably, for now use the deprecated STATES views as an interim solution.

Details on how to configure STATES views here: https://www.home-assistant.io/integrations/group/

It’s not longer unreliable for me, it refuses to work 100% of the time now. A few versions ago, 1 time out of 5 I’d get an error, now it just doesn’t work at all.

It’s a shame as I was really excited about this feature, but this issue doesn’t seem to be getting any developer focus at all.

1 Like

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

script:
  cast_home_assistant_kitchen:
    alias: Home Assistant Cast to Kitchen Display
    sequence:
      - service: media_player.turn_off
        data:
          entity_id: media_player.nest_hub_max
      - delay:
          seconds: 1
      - service: cast.show_lovelace_view
        data:
          entity_id: media_player.nest_hub_max
          view_path: '8'
1 Like

I use a similar script to the one @sebdoan uses, for me it works around 60%. When it doesn’t work, I also get an error “unable to find a view…”.

Hope this will be fixed soon.

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.

I just installed 0.105.2 and I can say the latest instance is a lot less stable for this casting feature vs 0.104.3

It now only works 10% of the time.

1 Like

Glad to hear I can stop beating my head against that wall and wait for a better release. I just started trying to use it for the first time.

I’m still on 0.105.2 but after several days the casting feature seems to get more solid with time. It’s about 50-70% reliable atm.

1 Like

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.

I’ve never needed to do that