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…
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.
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.
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).
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:
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.
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.