lovelace-card-mod icon indicating copy to clipboard operation
lovelace-card-mod copied to clipboard

Do we remove the Lovelace resource entry when installing 3.1.0

Open sddgit opened this issue 3 years ago • 16 comments

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.

sddgit avatar Nov 22 '21 07:11 sddgit

came here to ask the same question.

Thanks

chriscolden avatar Nov 22 '21 08:11 chriscolden

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.

anarion80 avatar Nov 22 '21 08:11 anarion80

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

thomasloven avatar Nov 22 '21 09:11 thomasloven

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

bcutter avatar Nov 22 '21 11:11 bcutter

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

chriscolden avatar Nov 22 '21 11:11 chriscolden

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

thomasloven avatar Nov 22 '21 12:11 thomasloven

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

pergolafabio avatar Nov 22 '21 17:11 pergolafabio

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/

johnnysmithy852456 avatar Nov 23 '21 05:11 johnnysmithy852456

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!

sddgit avatar Nov 23 '21 08:11 sddgit

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

thomasloven avatar Nov 23 '21 09:11 thomasloven

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

camochu avatar Nov 25 '21 21:11 camochu

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

ahmaddxb avatar Nov 28 '21 09:11 ahmaddxb

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.

rnotley avatar Nov 28 '21 18:11 rnotley

@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^)

dsegantx avatar Feb 05 '22 13:02 dsegantx

Should be gone now.

thomasloven avatar Feb 07 '22 22:02 thomasloven

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

pergolafabio avatar Feb 08 '22 06:02 pergolafabio