thomasloven / lovelace-card-mod

🔹 Add CSS styles to (almost) any lovelace card
MIT License
1.12k stars 167 forks source link

Do we remove the Lovelace resource entry when installing 3.1.0 #159

Closed sddgit closed 8 months ago

sddgit commented 2 years ago

I see the instruction to change the way card-mod is installed with 3.1.0. Do I also need to remove the resource./hacsfiles/lovelace-card-mod/card-mod.js?hacstag=1909275243013 from the Lovelace dashboards resources?

Thanks for any tips.

chriscolden commented 2 years ago

came here to ask the same question.

Thanks

anarion80 commented 2 years ago

Yes, looks like it. If you don't remove you will get an error in the log: 2021-11-22 09:07:45 ERROR (MainThread) [frontend.js.latest.202111090] https://ha/hacsfiles/lovelace-card-mod/card-mod.js?hacstag=190927524310:6:0 NotSupportedError: CustomElementRegistry.define: 'mod-card' has already been defined as a custom element I removed it in my case and everything is fine.

thomasloven commented 2 years ago

The error can be safely ignored. I'll make sure it's removed for the next release.

bcutter commented 2 years ago

Sorry, created https://github.com/thomasloven/lovelace-card-mod/issues/161 before discovering this issue.

chriscolden commented 2 years ago

I've removed it from resources and it does seem to be happy, however, two issues come from the back of that.

  1. HACS complains the module isn't loaded.
  2. If you reinstall or upgrade it puts the resources entry back.

Are we suppose to keep removing this after every update and should the HACS be moaning like it does for me?

Thanks Chris

thomasloven commented 2 years ago

No, you can leave it there and ignore the error.

pergolafabio commented 2 years ago

I think we need it on both places... If I remove it from the resources, seems the styles on the HA android app, are not applied ,i 'm having background issues then

johnnysmithy852456 commented 2 years ago

I see the instruction to change the way card-mod is installed with 3.1.0. Do I also need to remove the resource./hacsfiles/lovelace-card-mod/card-mod.js?hacstag=1909275243013 from the Lovelace dashboards resources?

Thanks for any tips.

I can only find my card-mod.js in config/www/community/lovelace-card-mod/

sddgit commented 2 years ago

It's in that place for me too. I figure the whole /hacsfiles thing must be some sort of symbolic reference, and that we should use what it says in the readme in the configuration.yaml file:

"You'll need to adjust that path according to where you have installed card-mod.js. If you installed through HACS, this is probably /hacsfiles/lovelace-card-mod/card-mod.js."

Not sure about that either though!

thomasloven commented 2 years ago

It should be whatever it says here: https://my.home-assistant.io/redirect/lovelace_resources/

camochu commented 2 years ago

Anyone had tried if it's solved in release 3.1.1? I have 3.0.13 and waiting to update

ahmaddxb commented 2 years ago

Anyone had tried if it's solved in release 3.1.1? I have 3.0.13 and waiting to update

It is still there in 3.1.1

rnotley commented 2 years ago

Beyond the error posted here that you can find in the web browser console, I believe this issue also causes an error to be logged in Home Assistant.

2021-11-28 10:04:16 ERROR (MainThread) [frontend.js.latest.202111090] https://ha.___.com:8123/lovelace/0:0:0 Uncaught image

I did limited testing, with and without the lovelace resource entry. With the resource entry, the error shows up when loading your dashboard. Without it, I don't see the error logged.

dsegantx commented 2 years ago

@thomasloven Any update on if/when this will get suppressed? There are several related issues logged for this which likely can get closed in deference to this. Would like to see it resolved as I’m a bit OCD with error logging…. B^)

thomasloven commented 2 years ago

Should be gone now.

pergolafabio commented 2 years ago

Cool, thnx... Do we still need it at 2 places?