Cool I have opened up my notepad++ and had a look at spacing which is all good and I had a re-read of the how to ask good question guide (I was wondering how to indent on the forum for code now I got it).
I found the issue to be that I downloaded the .js file from github and chrome kindly added html markup to the header of the bar-card.js file, I just copied the code from github and replaced the existing code in my file and restarted hass and now my bar is working .
There is post above which says customcards only applies to those who have installed and activated custom_updater in configuration.yaml which I haven’t done yet, but looks like good idea. I have left my url as /local/custom-lovelace/bar-card/bar-card.js?v=1.1.0 and all is good now.
This is showing two bars each in a vertical-stack both of which are in a horizontal-stack (if that is relevant).
One of them has an explicit icon defined (for testing) the other doesn’t (but the entity itself does).
No worries, I don’t think you’re the only one forgetting about cache.
I’d recommend using custom updater and tracker card. This allows you to set the resource url to redirect to customcards instead of local, which makes it so you don’t have to add versioning to the resource url and just updates the cache whenever you update a card.
My apologies if I have skipped this somewhere and it’s already possible, but I’m in the process of condensing my LL yaml file and was wondering is it possible to have one main config for the styles, title, css, etc… and assign different severity levels to the entities. Case use being battery, CPU, temp and humidity are set to different severity and colors, so currently I am having to repeat the code 4 times to set the differences between them. Everything works as expected in my displays, just thought I’d ask, and thank you for the incredible contribution, I see this getting included as a standard card IMO. @Gluwc
Well you do have an option to use custom entity attributes to set the config of the bar using the entity_config option. But that still requires you to set these options in customize.yaml.
The other option only really works when you define an entities list, which allows you to share the main card config between every entity in the list.