Secrets.yaml not working

Tried setting up secrets.yaml but receive error message…

homeassistant.loader: Unable to find component secrets

My configuration file includes…

secrets: !include secrets.yaml

http:
  api_password: !secret http_password

And the secrets.yaml is formatted as per the instructions…

debug: 0
http_password: [Redacted]

Has anyone else got this working?

Edit: I am running hass 0.23 docker container on a synology, with no other errors

Edit 2: just tried changing my http_password and it does actually work, but the error still occurs.

Will try adding some more secrets

Might be relevant: https://github.com/home-assistant/home-assistant/issues/2413

Yes, I have just tried to add a secret from a config file nested within a folder (/config/misc) & hass would not restart with error…

secret not defined 

Obviously there is still a bit of work to be done on this feature, but it will be excellent when it’s fixed

Cheers

You don’t need a definition to the secrets file in your configuration file. Try commenting it out and restarting.

1 Like

secrets is not a component. Just create the secrets.yaml file.

2 Likes

ah-ha! i have deleted that line & it removes the error

Cheers

I have the same problem but I am not understanding the solution. :confused:

My configuration.yaml
secrets: !include secrets.yaml

My secrets.yaml
http_password: ‘apassword’

Error message:

Invalid config

The following components and platforms could not be set up:

  • secrets

Please check your config.

But the site is asking for my password and are working. Damn enoying though having this message showing! :thinking:

Completely remove the line

secrets: !include secrets.yaml
2 Likes

Thank you!

so is it just assumed by the system that secrets.yaml exists? you dont need to tell home assistant?

There is no secret: component.

!secret is a homeassistant keyword that means ‘replace this with the corresponding entry from secrets.yaml’.