Need help setting up dashboard resources without hacs

Petro,

I’ve tried your suggestion and does not work.

This is what did:

  1. Moved and deleted all the listed resources in the configuration as per your example.
  2. Restarted HA and went back to the HA resource list to see if were loaded and listed, but the list was
    empty. All my dashboards were red, displaying errors

Any ideas?

Then you didn’t do it correctly. How did you add this in configuration.yaml? Please post the whole config that you added.

1 Like

I’m running a split configuration and had a resource file already setup in the lovelace folder.
So at first I’ve pointed to the resources.yaml like so:

#this from my current lovelace.yaml in my configuration folder

lovelace:

This is the default storage mode. My main Lovelace dashboard is UI managed.

mode: storage

Additional YAML-based Lovelace dashboards

add yaml dashboards

dashboards: !include …/lovelace/dashboards.yaml

resources: !include …/lovelace/resources/resources.yaml

#this from my current list resources.yaml


  • url: /local/community/lovelace-multiple-entity-row/multiple-entity-row.js?
    type: module
  • url: /local/community/lovelace-mushroom/mushroom.js?
    type: module
  • url: /local/community/lovelace-paper-buttons-row/paper-buttons-row.js?
    type: module
  • url: /local/community/lovelace-rpi-monitor-card/rpi-monitor-card.js?
    type: module
  • url: /local/community/lovelace-slider-entity-row/slider-entity-row.js?
    type: module
  • url: /local/community/lovelace-state-switch/state-switch.js?
    type: module
  • url: /local/community/lovelace-swipe-navigation/swipe-navigation.js?
    type: module
    #….there is more in the list

I have also tried your way, like so:


lovelace:

This is the default storage mode. My main Lovelace dashboard is UI managed.

mode: storage

Additional YAML-based Lovelace dashboards

add yaml dashboards

dashboards: !include …/lovelace/dashboards.yaml

resources:
- url: /local/community/lovelace-multiple-entity-row/multiple-entity-row.js?
type: module
- url: /local/community/lovelace-mushroom/mushroom.js?
type: module
- url: /local/community/lovelace-paper-buttons-row/paper-buttons-row.js?
type: module
- url: /local/community/lovelace-rpi-monitor-card/rpi-monitor-card.js?

There are no errors before or after HA restart. HA does not load-up the resources.
I’ve have used this before, with my yaml dashboards, so I do have some idea on how to use this.

The formating is correct. Pasting the text in here changes the format.

My posted configuration looks like crap!
I can’t yet post screenshots.

Sorry!

use 3 backticks before and after your code. this is a backtick `

either way, assuming your configuration is correct, then you just need to clear your cache and refresh the page. You may need to click the reload button in the hamburger menu on the overview page as well.

I’ve done that, including removing hacs (which BTW still shows 112 element unloaded items). lovelace|690x184

When you uninstalled hacs, did it remove the actual files?


It looks that Ican upload picture now!

Yes, Ive removed everything from the HA resource list. Otherewise, how would I know if the yaml list is loaded?

Please don’t share pictures for code. Just learn how to format the code properly. I’ve already described it to you in a previous post.

3 back ticks formats code

1 Like

If you removed the files, how is it going to load them… This really is not complicated.

You have a file on your system. It’s located on your file system in the directiory: a\b\c\filename.ext

You then call out that file in resources as a\b\c\filename.ext.

If you remove the resource call out or the actual file, it won’t work.

Sure, this is a new experience for me!

What I meant was, that after deleting manually the resources saved in HA > dashboard >resources the resources.yaml file should populate again the list. At time of using the yaml based dashboards, I do remember that was the case. I am not sure what other file you’re refering to (hacs or otherewise any other resource) that exists beside the system files holding that information and the user’s file (resources,yaml)

I still can’t tell if you understand how this works.

When you install any custom file, you download the custom file. For example, you’d download molly200.js to install a card that displays molly200 on your screen.

You then put that file in your config/www folder.

Then, you put the callout in resources for that file. In this case, we put molly200.js in the root config/www folder. So our resource callout would be

- url: local/molly200.js?
  type: module

I.e. you have to have both the file and the resource called out for it to be used.


All HACS does is automate that process. It plops the files into your config/www/community folder. It creates the alias hacsfiles for config/www/community. Apparently, if HACS doesn’t have internet, it doesn’t create that alias. I don’t know why that is, talk to the dev about it.

If you don’t want to use HACS, then you need to manually add these files yourself and manually call them out.

You can do that through the UI or YAML. Apparently if HACS is installed, it adjusts the UI resource callouts per your claim in a previous post.

So with all of that being said, your 2 options are:

  • Use HACS, call out the resources using YAML so that hacs does not modify the path.

or

  • Do not use HACS and call out the resources manually through the UI. Also, manually download and manage the files on your system.
1 Like

I have a feeling that you patronize me!
Of course this is not complicated, and I do understand how it works.
It is not hard to understand the location of the resources (ie. custom cards in the local folder) and the viewing and control of the resources which are done via home assistant UI. I also understand that the control and user’s input (including hacs) of HA’s resources, is just pointing the os to that source via the provided path. In addition, this input can be provided via the yaml file. This is why I believe that in my case, you wanted me to move back to yaml so that hacs would not be able to edit the file since is write protected. In retrospect, when HA reads the yaml file, it will update the os with the paths listed in the file and therefore should update the UI with the information from the yaml file, so that the user gets the necessary feedback.
The resources (custom cards) get loaded only if the information from the yaml, hacs interface and/or HA > dashboard >resources information is correct. Otherwise like in my case the ui shows nothing, which means that the information from the yaml file has not been passed to the os.

Do you still feel that I have this wrong or I don’t understand?

You still haven’t answered the question I asked 10 topics ago. Do the files actually exist on the system after you deleted HACS?? That’s why I’ve been responding this way to you. I can’t tell from your posts if you’ve checked that and I’ve asked more than once. If you answered that question, I can’t tell where you did based on the lingo you’re using. :man_shrugging:

All I want you to do is verify the file exists, then verify the resource callout (via the UI or yaml) is the same.

For what it’s worth, I use yaml to call out my resources and it works for everything.

What files are you refering to? Are these yaml files, the custom files from the /local/community folders? not sure what you want!

If you are refering to the custom files, no they are not removed.

My man, we are only talking about the JS files (The resources) and the resource text line in your configuration.yaml (The callout for the resources). No other files are in question here.

If the files exist and the resource that calls them out is properly set. Then it should work for you. Yaml is restricted to using YAML resources. UI can use both. If you don’t have HACS installed, then just use the UI if you can’t get YAML to work.

Don’t post screenshots of text!