Tag Archives: !secrets

Home Automation: Home Assistant: !secrets

I’ve been using HomeAssistant for a while and as my configuration.yaml file gets larger and larger it’s getting more and more passwords and api keys in. I wanted to neaten this up and also helps when you want to send the configuration.yaml file to other people to ask for help etc.

By using !secret options you can hide all of your passwords and api keys in a different file and can still be read by home assistant.

In the root of your home assistant directory create a file called secrets.yaml

add lines such as:

http_password: YOURPASSWORD

now within your configuration.yaml file where the password for the above is, simply type: !secret http_password

This will then read the secrets.yaml file and load the password from this file. This can also be done for api codes as well and keeps some extra security on your configuration.yaml file