YAML vs UI

I am a relatively new HA user but with extensive home automation experience with other platforms. I like the expedience of using the UI but frequently need to build out a more complex solution in YAML. I have split some of my configuration files into directories - specifically automations reside across numerous YAML files. Now when I use the UI to create an automation, it puts it in automations.yaml, which is ignored since it’s not in the automations directory. Did I miss a step or can one not use both hardcoded YAML and the UI?

Directory assignments from my configuration.yaml:

automation: !include_dir_merge_list automations/
script: !include scripts.yaml
scene: !include scenes.yaml
mqtt:
  sensor: !include_dir_merge_list mqtt/sensors/
  switch: !include mqtt/switch.yaml
binary_sensor: !include binary_sensors.yaml
sensor: !include sensors.yaml
group: !include groups.yaml

I think this will explain how to do what you want:

Thanks - it looks like that’s what I need. I read the document but must have dozed off for the last paragraph…

I get it. I often read an entire page of HA documentation and end up more confused then when I started. Then I read it again later and it makes perfect sense. :wink: