Multiple variable holding files

Hey there,

I’m using the secrets.yaml file quite extensively, not only for sensitive data, but for storing mqtt topics etc. as well. This comes with the price of a very long secrets.yaml document.

Is there a possibility to have a plethora of these files and just address them from within another yaml file?

e.g instead of using the !secret command use !filename.yaml

- platform: mqtt
  name: "All ceiling lights"
  command_topic: !secret RC321_command
  # how it's working right now:
  payload_on: !secret RC321_all_on
  # how it could be working:
  payload_on: !RC321MHz.yaml RC321_all_off

My thinking behind this is, that I’ve a lot of small “projects” that I want to setup as packages. These are all standalone and don’t really interact with anything else (e.g. plant watering system). For easy maintenance and deployability I would like to have a kind of “database” like the secrets.yaml file which I can simply ship with the package.

Can you use include statements in the secrets.yaml? I haven’t tried, so HA might not decode them before scanning the file, but if it does, I think you could separate the contents into different package files.