Coniguring packages via YAML

I’m trying to follow some guidance to create an interface to stream audio to a smart speaker. The documentation suggested to create a ‘packages’ folder inline with the configuration.yaml file to store code. I created the appropriate folders, and placed all the code as required.

But, when I tried to reboot HA, I got an error stating ‘packages’ was not valid. I played with the YAML config in Studio Code Server, and the indentation doesn’t match up. If I leave the double space out, Studio Code Server doesn’t complain. But, if I indent as required, I get this (I know screens are discouraged, but it was the only way to show the errors):

Packages belongs to homeassistant, therefore it has to be before your sensor configuration

Thanks for the reply. I moved the packages: include line so it’s before the sensor configuration. Now I see a different error with a configuration I copy/pasted in another yaml file. That I will have to get sorted, but it appears that did the trick for the packages issue. Thank you!