Structuring Scripts, Automations and helpers

So once you dive in, all the code starts to explode. When I started, all the helpers, intents and stuff went into the configuration.yaml. My automations are all GUI made, so in the automations.yaml and the scripts are all in the scripts.yaml.

How can I start organizing this into files without loosing the ability to maintain them in the GUI?

Can I have some automations in the automations.yaml and some in a folder in different files?

I played around with the includes but didnt get it to run properly… :frowning:

It’s my understanding that if you want to continue maintaining them via the Automation Editor (“the GUI”), you cannot separate them into multiple locations.

It’s possible to split the configuration so that automations created by the Automation Editor are stored in automations.yaml and automations you create with a text editor are stored wherever you want (even multiple locations).

However, it means the automations created with a text cannot be edited in the Automation Editor (only displayed). The Automation Editor offers the ability to import the automation but then it gets relocated.

Reference

Splitting configuration- Automations

1 Like

As a possible way, you may use UI for automations (which then will be kept in automations.yaml) - but only for automations which are “being designed”. When an automation is ready and tested, then copy it’s yaml to somewhere, delete the automation, create a new yaml file anywhere you want and paste a previously saved code.
Means - UI is only used for a design, then tested automations are kept in yaml. Of course you still can edit the yaml of this automation in some file editor, and still you can debug using traces in UI (if this automation has id).