Might be a dumb question, but did not find the answer our any dashboard.yaml files in the system. The dashboards (tabs) created in HA are also yaml files if I am right. So they, have to be stored somewhere? Or are they database driven and only in the data base? Would be interested to have the files for backup and editing.
It is .storage/lovelace
And it is in json and not yaml. That probably increases efficiency at loading but at the expense of user friendly access for geeky users
How do I access .storage with Studio Code Server on HASSIO?
You can do “file > open” - it’ll still show you the .storage folder, and from there you can find the JSON file(s). There’s a nice JSON plugin for VS code, it the embedded one let’s you install those?
Where from? Does not make sense in Studio Code Server … ?
Got it! Thanks.
thanks. I found it here (full path from root):
/config/.storage/lovelace
Home Assistant 2023.5.4
Supervisor 2023.04.1
Operating System 10.1
Frontend 20230503.3 - latest
so do most people just copy and paste from webGUI yaml mode → VS code (or notepad++) then make edits in yaml and copy-paste back into web gui?
(ie to work with yaml only)
I’m asking as it seems there’s no way to directly access the .Yaml files (as they are .yaml wrapped in json , when you access via .storage/ )
do i have that correct?
thanks
Just to note, this is not the way you should do it!!! (<= please notice the three exclamation marks) Really, there is a reason, why these things are kept hidden!
If you want to use YAML for your configuration, than use YAML files as intended. You can set the mode
per dashboard, so you’re free in the use of YAML and the UI to configure your dashboards.
The .storage
folder is hidden, because you could break things in an unrepairable way!
What is it, that you’d want to do? I’m a 100% certain, there is a better solution than editing in the .storage
folder.
ah i see, so once you manually set a dashboard to use YAML mode, then that specific dashboards file is only then stored in native .yaml, and not the default of yaml wrapped in Json? (ie inside the hidden .storage folder)
if that is the case, I will heed your warning and continue to do my current method of copying and pasting between notepad++ or VSC and directly into the web gui “Raw Configuration Editor” (and thus will leave the dashboards in their default “JSON wrapped mode”, ie NOT switch them to “Yaml mode”)
thanks
I’m not sure, I really get you right, so let me explain, how things should go with HA and the dashboards.
If you use UI-mode to setup a dashboard, the files will be stored in the hidden storage folder. If you want to change things in these dashboards, you use the UI, and in some specific case, people copy from the RAW-config editor to their editing app and back, to work with these dashboards. You never work in .storage
.
If you use YAML-mode, the dashboards will be setup in files, these need to be in /config
or a sub folder. These files you can change with every editor app you want. Many people use Samba to get to these files and work/edit them via network share.
If you want to change the mode you used for a dashboard, eg. from UI to YAML or vice versa, there are different ways for each direction.
From UI-mode to YAML-mode you copy all the content from the RAW config editor to the files you want to setup. As you specify the mode in the YAML file itself, it’s easy.
From YAML-mode to UI-mode it’s a little trickier, depending on how you had setup the original files. But in a nutshell, you copy your dahsboard data from the file and paste it in the RAW-config editor, after you have setup that dashboard via UI.
I hope this clear things up a little bit!