Adding custom resources with Lovelace in storage mode?

I’m using Lovelace in storage mode and have been using the UI designer. I’ve been trying to add a slider for my dimmers (https://github.com/thomasloven/lovelace-slider-entity-row) but apparently ui-lovelace.yaml isn’t read unless it is in yaml mode (?).

Contents of ui-lovelace.yaml:

resources:
  - url: /local/slider-entry-row.js?v=1
    type: js

Am I missing something? Or is it not currently possible to load custom elements in storage mode?

depends on the Home Assistant version. There was a bug with 0.85.0 but if you have 0.85.1, you can use the raw editor and it will work.

Thank you for the reply David!

I’m using 0.85.1, installed on a RasPi via the hass.io image (https://www.home-assistant.io/hassio/installation/).

I’m configuring the overview page using the “Configure UI” option in the top-right menu, not the raw ui-lovelace.yaml file.

In the card configuration, I add in the ‘type’ field but it can’t find the custom element:

My gut guess is that the ui-lovelace.yaml file is not being read because I’m not using ‘mode: yaml’ for lovelace, or the syntax I’m using for the ‘type’ field is wrong.

Thanks!

If you are using the GUI editor then the old lovelace yaml file is not used. You can use the raw editor to add the correct resources.

David,

Thank you again for your reply.

In which file do I add the “resources:” entry?

It’s not a ‘file’
Click on three dots in top right corner, select ConfigureUI. Click 3 dots again and click on Raw Editor and add the resources to the top there.

3 Likes

David,

Thank you so much for your patience. I did not know where to find the raw editor but now I do :smiley:

I have everything working now. Really appreciate it!

1 Like

Hi David,
Where has the resources moved with the latest version of HA. I am trying to load some stuff from HACS and says I must add it to the resources ?, thanks

in storage mode it’s in .storge/lovelace_resources
but I think the idea is that users should not touch it as there is Configuration → Lovelace Dashboards → Resources

In the latest versions, you can even click on “Community” (e.g HACS) in the sidebar and you will see under the “Installed” tab that the downloaded, but not configured, resources are marked with a red box. You can then click on that box, and on the resource-page, you have a nice “Add to lovelace” link which will do that automatically for you.

1 Like

Can you give a screenshot of what you’re saying here. I don’t see these tabs/boxes?.?

Just click on any card in the community store, and you will get this message if it is not loaded in lovelace

Simply click “Add to lovelace” and that’s it.

OP says they’re running in storage mode and I don’t believe the Home Assistant Community Store is available in storage mode.

HACS is available when people are running in storage mode. As far as I’m aware, custom bar card is the only custom card with a gui editor. Others can be added as manual cards, or added through the raw editor, in both cases the yaml must be typed manually.