New Custom Card Now Showing

What I’ve done:

  1. added the following under resources in ui-lovelace.yaml
  - url: /local/battery-state-card.js
    type: module
  1. added the following card config in ui-lovelace.yaml
 - title: Sensors
    icon: 'mdi:battery'
    cards:
      - type: entities
        title: Battery
        show_header_toggle: false
        entities:
          - type: custom:battery-state-card
            entity: sensor.battery_frontdoor
          - type: custom:battery-state-card
            entity: sensor.battery_garagesensor
          - type: custom:battery-state-card
            entity: sensor.battery_officesensor
  1. cleared cache and restart HA
  2. added battery-state-card.js under /config/www

yet I get this still:
image

yet I get this

Try starting HA once more.

Resources are not in ui-lovelace.yaml anymore. Add them via the interface or through the lovelace section spelled out in the documentation.

You are using Lovelace in YAML mode, therefore you cannot manage your resources through the UI. Manage them in configuration.yaml.

Yes, which is what I assume you are doing. Meaning you need to use the resources section in the lovelace section.

no dice on the restart.

directly from the blog that added dashboards:


This awesome new feature comes with a deprecation if you use Lovelace in manual YAML mode: You need to move the resources section from your ui-lovelace.yaml to the lovelace: section in configuration.yaml . It is not a breaking change yet; we still load them from the previous location if we didn’t find anything in the lovelace: section, however, this fallback is being removed in a future version.

If you manage your Lovelace via the frontend, we automatically migrate your resources. Please note that resources are not in the raw Lovelace configuration editor anymore, but in the Lovelace configuration panel.


Meaning if you’re using mode via the front end, add it via the front end. That migration may not be occuring. It’s not spelled out if it’s updated on startup or via the upgrade.

Also, this will be deprecated so you should be adding it through the UI anyways.

now you’re confusing me haha. I am in yaml mode, so per the error message above, the ui will not allow me to add resources (from the lovelace section), it’s telling me to continue using the yaml and describe the resources there.

to clarify, I have many other defined in my ui-lovelace.yaml in yaml mode that are working great.

tyresources:
  - url: /local/slider-entity-row.js
    type: module
  - url: /local/rgb-light-card.js
    type: js
  - url: /local/multiple-entity-row.js
    type: module
  - url: /local/mini-media-player-bundle.js
    type: module
  - url: /local/button-entity-row.js
    type: module
  - url: /local/battery-state-card.js
    type: modulepe or paste code here

Right, so add the resources via the resource section in the lovelace section. Not in ui-lovelace.yaml.

The are not the same.

lovelace:
  mode: yaml
  resources:
    blah:

ahhhhh, love section in the configuration.yaml. Ok let me try that out!

Yeah, the whole “we still load from ui-lovelace.yaml, but it’s being deprecated” never worked on my system. I attributed it to lovelace_gen, but maybe it’s just not working at all.

ok that did it, and now it makes sense to me. Thanks for the help!

I totally missed that.

Thanks for this, I’d had days trying to get a card to work. Turns out while this isn’t a breaking change, this also wasn’t working for me any more. Moving things to config fixed it all up. Cheers!

I’m late to the party but I have a resource via hacs listed in the config.yaml file and it still tells me the custom card doesn’t exist…

Even stranger if I just let it sit then magically overnight it starts working… I can’t understand that LOL

Restarts, reboots nothing fixes it… just let it sit and it just starts working… it’s happened twice already just like that… so right now I installed the zibgee network card from HACS and the waiting begins… it says doesn’t exist…