Where are the Lovelace dashboard configs stored?

I’ve created some Lovelace dashboards using the UI editor. I now want to change the URL of some of those dashboards. The UI does not allow it, so I have to change the URL from config.

Where are the dashboard configs stored? Can’t find them anywhere. They are not in the configuration.yaml and there is no ui-lovelace.yaml either…

4 Likes

From what I understand they are hidden files in the .storage directory. If you want to play with the files you should probably be using yaml mode instead.

1 Like

Thank you!

Is there a way to convert the dashboards to yaml files that I can edit afterwards? Will I still be able to also use the UI editor?

I suspect the files are hidden to prevent exactly what you suggesting you want to do. It’s probably best to live on one side of the fence or the other.

Ok, but how do I get to the other side of the fence, then? I mean, how can I start editing the dashboards through yaml (and I don’t mean re-entering them from scratch, but migrating the current UI-edited stuff to yaml files)?

To be honest, all I want is to change the URL of those dashboards. I don’t undererstand why the UI editor does not allow changing it once the dashboard has been created…

Well, it looks like editing the dashboard-related files in the .storage hidden directory is quite straightforward and works. They seem to be simple JSON files. You just have to make sure to change the dashboard related data in two files:

  • lovelace.lovelace_xxx
  • lovelace_dashboards

where xxx is the name of your dashboard. The second file seems to be some kind of index of all dashboards.

9 Likes

If anyone is trying to find the .storage folder from a boot drive mounted on another linux machine:
hassos-data>supervisor>homeassistant>.storage (will have to enable hidden files/folders in your file manager to see it).

1 Like

I have the same question – how does one access hidden files?

It depends on how you’re accessing the files. Usually the file manager will hide folders that start with a dot by default, but it should give you an option to make them visible. E.g. if you have the folder mapped to your machine, using the default File Manager in Ubuntu, pressing CTRL-H will toggle between showing/hiding hidden files.

If you’re accessing the files via ssh, you can go directly to the .storage file:

cd /config/.storage
ls -la
2 Likes

I normally use Studio Code Server but I tried File Editor following your comment. I cannot see an option to show hidden files; I can see .HA VERSION by default …

I cannot go to the root directory with either editor, only /config.

one way to allow editing in the Studio Code Server is to make a symbolic links to them in a place the editor can see using the Terminal AddOn:

mkdir ~/config/dashboards
ln -s  ~/config/.storage/lovelace.* ~/config/dashboards/

If new dashboards were created then new symbolic links would need to be made. Alternatively adding a symbolic link for the whole folder would solve that issue but I’m guessing that may be a bad idea.

if you really wanted to you could do:

ln -s  ~/config/.storage/ ~/config/storage
3 Likes