Dashboard help?

Trying to add the following to a dashboard: https://github.com/dmulcahey/zha-network-card

Where should I be saving the zha-network-card.js file? Right now I have it in config/www.

The instructions say I can add this to yaml: resources:

  • type: js
    url: /local/zha-network-card.js

Would I add that configuration.yaml?

I (clearly) don’t know what I’m doing when it comes to editing dashboards, any help on how to get started would be appreciated.

Yes this is all rather confusing, and it changed recently. You can be amazed at how long it takes to find something again after it has been moved in a recent tidy / upgrade.

I only know this because I have added three resources like this to the dashboard. Not having github access I end up doing it manually each time, but it seems to work.

I have not tested your particular resource, and the instructions do not follow the usual guidelines, but the following is what I have to do to add a js resource to the dashboard.

The js file is the working code, and this needs to go into the www folder within config (as you have it). Copy from github and paste (the code file, as is, with same name) into the www folder.

The resource bit (this tells HA where to find it) can be added in HA menu as follows:

  • go to settings (cog icon bottom left in sidebar menu)
  • click on ‘dashboards
  • top right ‘…’ menu option. there is only one option ‘resources’, select
  • bottom right ‘add resource’ option
  • in window, paste the url as given '/local/“filename”.js (where filename matches that of the file)
  • select javascript module

I can’t recall, but you probably need to restart HA for this to take effect. Certainly, just after a restart the dashboard(s) will show a block with code/ error message until everything has been found.

There is no need to edit configuration.yaml as far as I know.

Once added as a resource the card/code whatever should be available to add to a dashboard

I hope this works for you!