AmoebeLabs / flex-horseshoe-card

Flexible Horseshoe card for Home Assistant Lovelace UI. A card with a flexible layout, a horseshoe-like donut graph, multiple entities or attributes, graphics and animations!
278 stars 43 forks source link

Horseshoe card doesn't work after update of HA to 2022.10.5 #58

Open JaroslawPrzybyl opened 2 years ago

JaroslawPrzybyl commented 2 years ago

This card stop working after last update of HA. Do you know this issue and is any fix available?

Mediacj commented 2 years ago

Same for me I reinstalled the card but still the same. I get this error: "Custom element doesn't exist: flex-horseshoe-card."

mhooghiemstra79 commented 2 years ago

Same here on my mobile devices. Strange thing is though on my nest hub where I use dash cast to cast the same dashboard it works fine.

AmoebeLabs commented 2 years ago

I think that if you would check the console from Chrome you will see CORS errors.

My installation does NOT work anymore with the latest HA if I omit the cors_allowed_origins

HA currently needs the cors_allowed_origins to be set (https://www.home-assistant.io/integrations/http/)

FH needs some stuff from unkpg.com. My current list is:

http:
  server_port: 8123
  use_x_forwarded_for: true
  cors_allowed_origins:
    - https://google.com
    - https://www.home-assistant.io
    - https://unpkg.com
    - https://<my-ha-domain.com>

You can also use a CORS plugin for Chrome to test things:

image

My test cards are still working with the latest HA:

image

image

Let me know if the CORS errors are indeed the problem!

JaroslawPrzybyl commented 2 years ago

After adding this section to http config, it started to work, thx!

AmoebeLabs commented 2 years ago

After adding this section to http config, it started to work, thx!

Great. I have pinned this issue, and will add some comments to the readme tomorrow! It’s now F1 FP1 time đŸ˜„

Since I tested already the beta’s, I totally forgot this issue once this HA version would be released…

ZoltanPerhacs commented 1 year ago

Hello!

I tried the above method, but it doesn't work. Home Assistant 2022.3.5 Manual installation. Card doesn't show up in add card to dashboard. Other custom cards do.

koala04 commented 1 year ago

i have same problem.

my configuration.yaml already include:

http: server_port: 8123 cors_allowed_origins:

but i recive:

Access to script at 'https://unpkg.com/lit-html@%5E1.0.0?module' from origin 'http://192.168.xxx.xxx:8123' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Uncaught (in promise) http://192.168.xxx.xxx:8123/hacsfiles/flex-horseshoe-card/flex-horseshoe-card.js?hacstag=207292725090

djbombacz commented 1 year ago

I have same problem. Home Assistant 2023.3.6 / Sup. 2023.03.3 / 9.5 I get this error: "Custom element doesn't exist: flex-horseshoe-card." Do you know this issue and is any fix available?