amaximus / garbage-collection-card

Custom Lovelace card for Garbage Collection custom component
MIT License
127 stars 24 forks source link

[BUG] HACS flags error and resource doesn't load #74

Closed Sudo-Rob closed 3 years ago

Sudo-Rob commented 3 years ago

Describe the bug

Integrated with HACS 1.10.1 along with Garbage Collection 3.15. The card resource doesn't appear to be loading. Everything seemed to be working properly until the recent update to core-2021.2.0. The sensor entities look to be properly formed. The issue could be related to [BUG] #65, but my instance had been working until the recent Core update.

Expected behavior Display of two cards and no errors.

Screenshots image image image image

Environment (please complete the following information):

Additional context

image

Also tried:

image

image

amaximus commented 3 years ago

Please replace /local/community with /hacsfiles in the resource definition then restart HA to take effect. If the issue still persists please flush tour browser's cache.

Sudo-Rob commented 3 years ago

I had no such directory so I made one, uninstalled the card, made a /hacsfiles directory, and then reinstalled the card. Then I see this:

image

Do you suggest I delete all vestiges of the prior installs?

amaximus commented 3 years ago

You don't have to create the directory as HACS will install under www/community/..., but don't bother with that, simply write /hacsfiles/... instead, the rest will be handled by HA. Of course you'll have to restart HA after changing the resource path.

Sudo-Rob commented 3 years ago

It's always been at www/community/ and it's still there. HACS doesn't provide the ability to target a specific directory. It seems to look for a prior installation.

Why doesn't the card integration find it there with the /local/ reference that used to work? Should I change it to /config/www/, or should I just delete all the files and move it manually to /hacsfiles/?

amaximus commented 3 years ago

That's how HA handles it. Do not uninstall it, simply write /hacsfiles/garbage-collection-card/... in the resource definition then restart HA. The files will still be under www/community, hacsfiles is sort of "virtual path".

Sudo-Rob commented 3 years ago

OK. That almost appears it might be working, but HACS still thinks it's broken. It'll take a few days to know for sure.

I still don't understand why it worked before and doesn't now. Was there a breaking change I missed? Why are the other integrations (e.g. Garbage Collection) working without the "virtual path"? Where is this virtual path documented?

Do you think this can be some sort of synchronization problem with HACS?

BTW, thanks with the help.

amaximus commented 3 years ago

Integrations like Garbage Collection are installed to a different location as they are custom platforms/components. Cards are sort of plugins for the frontend; installed via HACS they end up under www/community/....

Sudo-Rob commented 3 years ago

The integration is working again, but HACKS still thinks it's not. I see status as "not loaded." I'd be happy to gather any information you need to resolve the issue.

Thanks.

Sudo-Rob commented 3 years ago

FYI: With a bit of help from @ludeeus, I figured out the issue:

image

amaximus commented 3 years ago

Thanks for pointing this out. I will update the Readme.