Split automations.yaml into multiple files

Hi!

I know there are other threads available that deals with the same problem but I cannot get it to work with those instructions. They are a bit old, possibly something in the hass.io implementation have changed?

I want to divide my automations.yaml into multiple files.

Today I have this line of code in my configuration.yaml and my automations in automations.yaml and it works fine.

automation: !include automations.yaml

According to other posts it should be possible to have one file per automation by creating a folder named automation in my config directory and within the folder add one file for each automation. Instead of the above line of code I would simply add this to configuration.yaml instead

automation: !include dir_merge_list automation

Even if I leave the automation folder empty (to avoid any errors in those files) I can not even get hass.io to boot into the web iterface. If I reverse to the first line it works again.

What am I doing wrong?

Thanks!

According to the docs here:
( Scroll down to Advanced Usage )

…you should be using !include_dir_list if you have one automation per file.

Also mentioned is that using this method you need to remove any auto generated -id: lines from your automation files.

5 Likes

Wow, thanks alot! Works like a charm.

It is people like you that makes it possible for newbies like me to move forward. Thanks!

2 Likes