Anyway to get custom components to work when casting?

I think the browser in the Google Nest Hub does not really follow the standards very well. I had tried the “?” at the end in the past, but it does not change anything.

I think I am just stuck with the standard cards.

Would you know why the standard cards work without any issue? Why does that not have the cache issue that I have with custom cards.

The cache issues you are seeing are self inflicted. the built in cards have the correct resources layed out from the beginning. Custom cards do not if you put them in wrong. You trying all these random urls are what is causing the problems. Just using the correct url the first time through and you wouldn’t have the issue. Hence why I keep hammering the “Keep it one of these urls and it should work with the safest route being # 2”

I think its more something in the Google Nest Hub.

Because the button-card worked fine at first. Then I added a second custom card to the dashboard, without changing anything to the button-card. But on a reboot of the Google Nest Hub, it cant find the button-card.js anymore.

1 Like

but if you’re pointing to the wrong resource location… It’s not going to work and it’s going to hold that location until it’s cleared.

Hi, I have the same problem… the custom card did work but now it stoped working with the same error… have tried the resources fix but nothing…is working…

normal cards works and all custom cards works in the browser on the PC.

1 Like

I totally gave up on any custom components. They just won’t work with google cast. I think it has to do with the cache of the google hub, so not much probably that can be done about it.

1 Like

Ok, the thing is that i had it working but it just stoped to do so.,.

Any progress with this?

I’m noticing that card-mod and browser-mod both don’t work when I cast to my Nest Hub 2. I’ve added the HTTP CORS section and also added the resources: section to my YAML for browser-mod its instructions.

But still, neither of them work. I’m not really sure what the issue is…

Also button-card seems to be working just fine for me. It’s the associated browser-mod/card-mod stuff in my dashboard that isn’t working (so no popups, etc).

1 Like

Any news about this?
I’m having the same issue and it’s quite annoying.

1 Like

Any news about this?

You can just use CATT again. The Cast will no longer be removed after 10 minutes. CATT also gives you way more control. More info here: Using CATT - Configuration - Home Assistant Community (home-assistant.io)

I don’t know if this will help others here, but I was using card-mod and noticed that my custom styling didn’t get picked up unless I manually made changes while the dashboard was live, which forced a refresh.

I’m pretty sure it’s a caching/ordering issue on the Nest Hub side, but I got around it by first casting a custom empty dashboard to force the dependencies to load, then immediately cast the thing I intended, and the custom styling does seem to get loaded. I haven’t tested it rigorously enough to know that I’m not still getting lucky from cache hits, but it seems promising.

Here’s the empty dashboard I cache first to ensure that the Nest Hub browser has all the dependencies cached first, then I cache my real dashboard immediately after.

views:
  - title: Home
    cards:
      - type: markdown
        content: <!-- comment -->
        card_mod: |
          .ignore { }
    type: panel

I tested it by rebooting the hub to get clean caches, then manually invoking the service twice. Both dashboards are single-panel for simplicity:

service: cast.show_lovelace_view
data:
  entity_id: media_player.kitchen_display
  dashboard_path: empty-dashboard
  view_path: "0"
service: cast.show_lovelace_view
data:
  entity_id: media_player.kitchen_display
  dashboard_path: mycustom-dashboard
  view_path: "0"

I’m curious - does this trick end up working reliably for anyone else?