Cleaning up automation config

Hi, Been using HA off and on for many years. I currently have a file automations.yaml in by “root” directory and another in “config/automations.yaml”. The config/ one is included via

automation: !include config/automations.yaml

In my configurations.yaml. I assume the one in the root is managed via the Automations UI and the other is for handcoded automations. What is weird, and i cant recall how it happened, is some of the automations are duplicated.

Now to my questions, what is the ‘best practice’ for managing this? Is there an easy way to make an existing automations manageable via the UI?

See Migrating your YAML automation to automation.yaml.

Anyway, where is your configuration.yaml located?

In my setup, both configuration.yaml and automation.yaml is located in /config folder.

Then, inside configuration.yaml, we add automation: !include automation.yaml.

I misspoke. I have the following:

config/configuration.xml
config/automations.xml
config/config/automations.xml

Only automations located in /config/automations.yaml can be edited through the UI.
If you read the link in my previous post, you can move your automations that are located in /config/config/automations.yaml to /config/automations.yaml.

A few things to be kept in mind:

  1. You need to have an ID for your automation - can be any string as long as it is unique from other ID in your /config/automations.yaml
  2. Make sure the newly added automations remain a list in /config/automations.yaml

Note: Do it one by one. Each time you migrate an automation, go over Server Control —> Check Configuration. If it’s valid, proceed with the next automation migration.