there seems to be an ongoing issue with customer elements as some newly added/integrated simply don’t show up … for some odd reason. Searching here in the forum, as well as Reddit for example I found various topics on the issue but unfortunately no solution.
I am trying to install for the last two weeks the custom element “custom-header” - which I installed via HACS, where it says that the configuration requires “/hacsfiles/custom-header/custom-header.js” for the URL definition.
Interesting though that with the installation via HACS no directory hacsfiles was made - so I made the directory myself, but that did not help as well
The entry for Lovelace on my configuration looks as follows:
Over the various days I have had the custom-header directory beneath community, community-plugin, I had the hacsfiles in the config directory - I tried all sorts of variations, without any success.
I am sure the problem sits in front of the screen - what am I doing wrong here, anybody has any idea? Any help HIGHLY appreciated!
also on my installation the HACS files are stored in the www/community/ folder event thoug the path says hacsfiles/, so make sure your files are located in the community folder.
If this code shows the real indentation this might be the issue.
What does the Ressource Editor show?
In HA go to Configuration → Lovelace Dashboards → Ressources
you need to go to HACS control panel and delete the custom-header plugin from there.
then go to your directory that you show in your last screen shot and delete the the “custom-header” folder along with the “hacsfiles” folder that it’s in.
then go to the HACS control panel and re-install custom-header
At that point you should have a “custom-header” folder inside the “community” folder which itself should be in the “www” folder.
after that put the following in your resources section in lovelace:
Further to this it’s a common misconception that /hacsfiles/ is a real folder and actually ‘exists’. It doesn’t - it’s an endpoint that points to content in /www/community. Note that local doesn’t exist either - it points to the www folder.
Thank you for the detailed description, which I have followed it step-by-step but … still does not work
I have deleted all prior custom-header files, have uninstalled it, cleared cache, reinstalled … but still the same result … I have no idea why … perhaps it is written in some configuration file unknown
The only thing I see right off the top of my head is your indentation is off in the code you posted. Check to make sure it’s correct in your actual config.
It definitely has to be in configuration.yaml not in ui-lovelace.yaml
Did you ever get it working? I’ve got a number of cards installed via HACS that are in the /www/community/ folder as expected. However when I add the resources via the Lovelace configuration, the cards still don’t work after restarting and refreshing the browser. Any other missing steps to get custom cards working?
I’ve followed the instructions carefully from all the different custom cards, it sure seems like I’ve done every step. I had custom cards working fine via HACS on my older version on RPi3, but when I upgraded my system, I wanted to start fresh because a lot of things had gotten messy during my learning.
How do you add the resource to the configuration? Do you copy it from the HACS screen and then paste it into your editor?
I did that always and after I don’t know how many tries, I realised that there were some tabs and other characters that you cannot see included in the copy - it all looked fine but it screwed the resource information. So I deleted all space characters in the resource definition and added manual spaces:
e.g. after I have retyped the spaces in below it worked … at least worth giving it a try but I cannot guarantee
Do you see any errors in the browser console? Press F12 in chrome for dev tools and while you are there right click on the refresh button and select clear cache and hard reload and then CTRL+R a couple of times. The error you show is either HACS isn’t running (/hacsfiles/ endpoint doesnt exist therefore no card found) or cache is caching old cards.
Can you confirm hacs installed cards in /www/community/card-name’directory?