Editor Generated Automations and YAML Automations

I have a number of automations that were written with the automation editor and work just fine. I now have written a couple new automations using just YAML because the editor doesn’t appear to support the logic I am trying to accomplish. My question is how do I include the YAML code for my new automations without messing up the automations written with the editor. When I put the new YAML code into the automations.yaml file, I am no longer able to edit the older automations written with the editor. The older automations get greyed out and I can no longer edit them with the editor. If I remove my new code then the older automations can be edited again.

Thanks,

I suggest you store the automations you create manually in a different location from the automations created via the Automation Editor. Both will be listed correctly and you will continue to be able to modify the ones created via the Automation Editor.

The instructions are here but all you need to do is modify your configuration.yaml file like this:

automation: !include automations.yaml
automation manual: !include_dir_merge_list automations/

Create a sub-directory called automations and store your manually created automations there in either one file or in as many files as you want.

You will need to restart Home Assistant for it to accept the changes to configuration.yaml .

2 Likes

Thanks for the info! I am fairly new to home assistant so still figuring it all out. Thanks again

1 Like

You’re welcome!

Please consider marking my post (above) with the Solution tag. It will automatically place a check-mark next to the topic’s title which signals to other users that this topic has an accepted solution. This helps users find answers to similar questions.