Open ThatTallGuy21 opened 1 year ago
Anyone else having this problem in 2023.10 or 2023.11?
Same issue here. Its been broken since 2023.10. Well, that's when I first noticed it, when the season started. I was hoping it would get fixed.
Thanks for the confirmation. Is there anyway to tag or get a hold of the owner in github? I'd just like to know if they're still planning to support the card or not. If not, then I guess I'll need to find an alternative option.
I figured it out.
You need to edit the ha-nhl-card.js file and change the first line to these 2 lines:
import { html } from "https://unpkg.com/lit-html@2.0.0/lit-html.js?module"; import { LitElement } from "https://cdn.jsdelivr.net/gh/lit/dist@2/core/lit-core.min.js";
Once you've saved it you need to copy the ha-nhl-card.js into the ha-nhl-card.js.gz archive file replacing the one that is in there.
As soon as I did that and reloaded the resources, it works!!!
Thanks! I guess I'll need to do this since @SimplySyced may have abandoned this project.
@gizhola, I think I'm doing something wrong. I made the update above in the ha-nhl-card.js. However, do you mean that I'm supposed to copy and paste the entirety of the content found in the ha-nhl-card.js into the ha-nhl-card.js.gz file found in the same folder? I did that, overwriting the only text that was in that file "'utf-8' codec can't decode byte 0x8b in position 1: invalid start byte" with the same content and restarted HA and the card still isn't working. Can you give any help on what you mean for this second and even third step?
@ThatTallGuy21 Make that change to the ha-nhl-card.js and then use a program like 7-zip to open the ha-nhl-card.js.gz archive and copy the modified ha-nhl-card.js file into the archive to overwrite that file.
Once you've done that, reboot your Home Assistant to reload the resources. At least that's what I did.
@gizhola - That did the trick! Thank you so much! For anyone else that stumbles across this thread, one other thing I had to do was clear my browser's cache and then it started working again.
@ThatTallGuy21 glad you figured it out, and good point about a cache refresh.
@ThatTallGuy21 Make that change to the ha-nhl-card.js and then use a program like 7-zip to open the ha-nhl-card.js.gz archive and copy the modified ha-nhl-card.js file into the archive to overwrite that file.
Once you've done that, reboot your Home Assistant to reload the resources. At least that's what I did.
Thanks for figuring this! Followed these instructions and it worked.
To anyone else: Dont be like me and bash your head into the wall for an hour and it still doesnt work, make sure you clear your cache after loading the new resource!
After clearing cache in dev mode it worked fine.
At some point after updating to 2023.10 I noticed that the custom nhl card no longer loads the lovelace card. Instead it throws an an error "Custom element doesn't exist: nhl-card" despite having and not changing anything mentioned in setup.
Nothing in my config changed and it was previously working for months prior to 2023.10. I just updated to 2023.11 and it's still not working.
I can see the NHL integration used for this card is still pulling in data for my team.
I also completely deleted the lovelace files and custom repository. I then redownloaded and installed everything again as well without any luck.