Is There a Way to Mass Import/Export Entities (and Automations/Scripts) from File?

Hi everyone,

I’m working on a fairly complex automation flow that requires the creation of a large number of entities (as well as automations and scripts).

Doing this manually through the GUI is quite time-consuming and not very efficient. On the other hand, when creating them via YAML files, I’m then locked into editing them through files only, losing the flexibility of managing them later via the UI.

So my questions are:

  • Is there any existing way to import and export entities, automations, and scripts in bulk, ideally allowing both file-based creation and later GUI management?
  • If such functionality doesn’t exist, would it make sense to create a custom HACS component to enable this kind of import/export workflow?

I’d love to hear if others have faced similar needs or if there’s a recommended approach I might have missed.

Thanks in advance!

No reason why you shouldn’t edit yaml files outside HA, then copy them into the config folder.

You would then have to restart HA or use the yaml configuration reloading options in Developer Tools to make them usable in the GUI.

Yes, I do this. I use shell scripts to generate packages and then move the packages to the HA config directory. First step is to create a package and have it working in HA. Then use shell scripts to replicate - which is mostly search and replace of entities ids, names, etc. Whenever you change the master package, rerun the script to deploy changes to all instances.

So, if I do a custom HACS component to import/export, it will be useful?

I think the functionality is already there in the Samba Share add-on.