Home Assistant Cast with custom cards

In case that someone gets here. It seems like you have to do the following steps to make your custom-card work:

  • add CORS setting for cast.home-assistant.io
  • ensure LitElement stuff from suggestion of @DavidFW1960 in #5
  • add or change the custom-card Javascript to be located at /local/community/custom-card/custom-card.js instead of /hacsfiles/custom-card/custom-card.js

It seems that the /hacsfiles/ directory is not directly handled from the http component of home-assistant and thus does not have proper CORS headers.
I’ve changed the location to /local/community/* and now I can see my custom-card on my Nest Hub. :partying_face:

Probably /hacsfiles is not supported by nabu-casa in combination with CORS :man_shrugging:

3 Likes