How to copy a lovelace UI from one system to another

If possible, how can I copy my UIs to a new system.

Thanks!

You need to be more specific. You can`t copy the YAML from one system to a second because all of the device entities will be different. If you mean to upgrade / replace a system, then do a backup on the old and restore on the new.

I am rebuilding my system from scratch, have pulled in the zwave system, and except for a few, they have the same device IDs.

The lovelace UI yaml should match. I can tweak what is not connecting. My system is not that large.

Backup on old, restore on new.
They are unlikely to have the sane device ID`s so you will have to fix them one at a time.

I would just simply start over unless you have some custom cards. If you are upgrading from a Pi to a more robust mini PC, just change the name of the old and run both and copy components as needed.

Just start over and save yourself from frustrations.

The reason for building from the ground up (as opposed to restoring from backup) is to overcome some problems that I have worked on for a long time with no resolution. And others don’t see these issues so no resolution from these wonderful forums.

For example, Trane/Nexia does not work. I have yet to strip that information out of one of the files that people say don’t mess with. I have had other issues, which might not be related to the system.

Going with a rebuild from the ground seems like a plausible path. I checked that many of my IDs are the same. Some are not. I have pulled in my automations via yaml file (as these were set up prior to HA switching to UI created automations).

If anyone has an idea on how to copy a lovelace to a different system, that would be much appreciated.

One method I use quite often when building parallel test systems:

1. Click on the 3 dot menu in the right top corner of your overview.

2. Open the raw configuration editor.

3. Copy and paste the data into a txt file on a PC.

In the new system, use the raw configuration editor to add the saved lovelace data.

If you rename the device/entities to match the old system, the lovelace will work fine.

Automations will need rebuilt if device IDs are in play. A good reference

1 Like

Exactly what I was going to suggest

1 Like

Appreciate the confirmation! Just used this method over the past two days :crazy_face:

Been running multiple x86-64 systems, but got motivated to consolidate after relocating my rack server. Testing out running HAOS on a VM with my mosquitto broker and Z2M in Docker containers.

1 Like

You can still switch to YAML mode in your automations.