Bulk Export entities to csv then Bulk Import of changes (Rename, Delete)?

Is there a script example to export all entities to a text file that I can manipulate in an editor, or a spreadsheet, and then re-import the changes?

I’d like to be able do the following:-
2. rename several entities suffixed with “_2” to remove the _2
3. change icon, area, name, and/or entity id as I change my naming standard.

I’ve seen various code snippets to extract the data and change some elements, but I would find it easier to extract, transform groups of entities in a spreadsheet, and load back in to HA.

as for renaming the entities, what I have done several times and worked always.

  1. I rename the entity
  2. I open the automations.yaml with the HA file editor Addon, copy all and do a search and replace in notepad++, paste it back in automations.yaml
  3. you can do the same with scripts.yaml.
  4. restart HA
  5. you can also do the same for your lovelace dashboard

Note: if you using devices instead of entities in your automations, it only works if you rename a device.
It won’t work if you replace a device, since a device has a unique ID as well, you would need to replace that ID too!