How to split or refactor secrets.yaml? [Closed]

Hi,

I recently refactored my integrations and automations which has significantly reduced the length and hence clutter of configuration.yaml.

So I was wondering if there is a way to split secrets.yaml? I am thinking of following:

  • Add a folder named “newSecrets”
  • The folder can contain multiple files such as camera.yaml, smtp.yaml, switches.yaml etc

I did try adding following to configuration.yaml:

secrets newSecrets: include ./newSecrets

But it did not work and I am not sure if this is not doable or I did something incorrectly.

Thanks.

No. The !secret keyword in homeassistant means ‘replace this with the corresponding entry from secrets.yaml’

It’s really only there for hiding passwords and confidential things if you choose to share your configuration, so even with a large setup your secrets file shouldn’t be unmanageable.

2 Likes

thanks @anon43302295 for the clarifications!