Help Splitting Config Files

Is it possible to have nested folders in yaml config

If I understood which one to use I wouldn’t be asking…
I have managed to already split my config but I couldn’t find anything on nested or sub folders in a folder a folder??

Dont get confused with packages and the rest

packages have everything in one file


I build a catfeeder

so my config

 packages: !include_dir_named packages

then have a folder in side the packages folder call Cat-feeder

which has everything in it related to it

but my MQTT: stuff that I don’t want to package


that what so cool about HA

once you understand the rules you can make them fit your needs


See this video with French and Dr. Zzs.

Yes. If you’re not using packages, use !include dir_merge_list foo and you can have nested folders under foo. Top of my configuration.yaml looks like this:

automation: !include automations.yaml
automation manual: !include_dir_merge_list automations
binary_sensor: !include binary_sensors.yaml
climate: !include climate.yaml
group: !include groups.yaml
  sensor: !include_dir_merge_list mqtt/sensors
  binary_sensor: !include_dir_merge_list mqtt/binary_sensors
  switch: !include_dir_merge_list mqtt/switches
proximity: !include proximity.yaml
rest: !include_dir_merge_list rest
script: !include scripts.yaml
sensor: !include_dir_merge_list sensors

and, for example, I have automations/hot-water/hot-water-on.yaml containing an automation and rest/printer.yaml with a few sensor definitions in. I could choose to create a folder structure under rest and that would work with a reload and no further changes to configuration.yaml.