What goes under the "homeassistant:" section in configuration.yaml?

I think I messed up some very basic things in my configuration.yaml and that raised a couple more questions that I couldn’t find answers for. When I’m including files, how do I know if they should be separated and at the top level, versus being under the “homeassistant:” tag? If I put the “automation: !include automations.yaml” under the homeassistant: heading, it says I have an invalid config file. Just trying to understand when something needs to be under that heading or not without doing trial/error and not understanding why.

homeassistant:
  packages: !include_dir_named ./automations/packages/
  customize: !include customize.yaml
  
automation: !include automations.yaml
group: !include groups.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
1 Like