Hello all,
I’m a newbie to HA and this is my first post. I have previous experience in software programming and I wanted to proceed to create my own objects within HA. However, I have not found any complete guide that would explain me how to manually activate YAML mode and create, inside the config folder, the ui-lovelace.yaml file necessary to start, containing the code of the current cards and dashboards in use. I have read about the existence of an addons to perform the migration and automatically generate the ui-lovelace.yaml file, but it needs Supervisor for the installation, which in the Core version (the one installed on my Docker) does not exist. Could someone help me and show me a way to follow in order to proceed to a start with the migration of lovelace?
Thank in advance.
Have you looked at This ?
You can edit dashboard from UI by clicking 3 dots in upper right corner of UI and select “edit dashboard”
In this screen selecting [+] symbol at bottom right allow adding cards by gui
clicking 3 dots in upper right corner of UI again and select “raw configuration editor” allows you to manually edit Lovelace code from hi
You may also edit Lovelace in config folder
EDIT
Not clear from above but can you currently acces UI in web?
Hello @tmjpugh,
thank you very much for your reply. For the first time, following your few but useful instructions, I was able to see and modify the lovelace code. I saw that the code was saved inside the .storage folder and I assume that the instructions in the link you sent me (THIS) will allow me to use the ui-lovelace.yaml file for the configuration. Now it is too late for me to do other tests, tomorrow I will try to do others.
Thank you again for the instructions you sent me that which unlocked me the ability to edit dashboards via code.
Regards
Raoul
Hello @tmjpugh,
I just ran the instructions in your link up to and including “Using YAML for the default dashboard”, but whatever changes I make to the ui-lovelace.yaml file are not reflected in the default dashboard. I probably didn’t do something correctly, but despite double-checking everything step by step I don’t understand what. Could you please help me?
Thanks.
I’m using UI but essentially it is
- Create ui-lovelace.yaml in config folder
- copy/paste current lovelace code from raw configuration accessed from ui
- add below in configuration.yaml fine. I think it goes before http section
lovelace:
mode: yaml
- restart homeassistant
If you have issues check logs for errors/warnings
Ok, this problem is solved. Inside the configuration.yaml file there was already a lovelace: line that I had not seen. Eliminated this, all is well. But where is the HA logs located?
HA UI >> sidebar >> Configuration >> Logs
You can click on the messages displayed to get expanded details
Hi @tmjpugh ,
thanks for the information. I have one last problem that I can’t solve: when I code for a new lovelace
like this
dashboards:
lovelace-test:
mode: yaml
...
a new lovelace is created equal to the main one (with all object in it), while I would like to create it initially empty. How can I do?
Thanks again.
Raoul
- Copy current ui-lovelace.yaml to new file for backup
- delete all unneeded items/cards from ui-lovelace.yaml and save the new file
- refresh browser to see changes
I would like the main page ui-lovelace.yaml to keep updating automatically (with all items / cards in it), and for the new page to be blank. If I make the main page blank by deleting the contents of ui-lovelace.yaml, the new page I am going to create via code still contains all the items that the main page contained, without having the option to delete them.
Your goal is slightly unclear but sound like you making some code that will dynamically change the UI in some manner.
If this is tru then I think you only need to recreate the entire ui-Lovelace.yaml file each time and replace old
HA will not insert default items into UI. If this is happening then you may not have something properly set
Lovelace default is to display All Entities. I think you I’m using docker correct? Maybe you not bind mount comfy folder or file correctly and docker recreating this file by default upon reatart(your changes are not being saved??)
Hello @tmjpugh ,
I think there was some problem with the settings that created a bit of confusion, so I preferred to reinstall all over again. Now it seems that the problems are gone and everything is working as it should. I hope it doesn’t get confused again.
Thanks for your assistance and suggestions.