Is it possible to use environment variables in HA automations, secrets.yaml, etc?
I’d love to be able to not store sensitive information in secrets.yaml, but instead have that info come from /etc/environment. For example, instead of:
db_info: mysql://hass:my [email protected]/homeassistant?charset=utf8
Define MYSQL_USER
and MYSQL_USER_PASSWORD
in /etc/environment and use
db_info: mysql://${MYSQL_USER}:${MYSQL_USER_PASSWORD}@127.0.0.1/homeassistant?charset=utf8
This way all sensitive information could be encapsulated in one place. I already use these environment variables elsewhere, such as in my docker-compose.yaml
file. It would be nice to not have to store them in multiple locations.