Skip to content

Missing instruction how to include secrets.yaml into configuration.yaml #37623

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
balconissimo opened this issue Feb 22, 2025 · 5 comments
Closed
Labels
configuration Stale The PR had no activity for quite some time, and is marked as Stale

Comments

@balconissimo
Copy link

balconissimo commented Feb 22, 2025

Feedback

I came here for information on how to include the secrets.yaml file into the main configuration.yaml.
I mean that !include secrets.yaml line. In my case, I just tried
secret: !include secrets.yaml and got a yaml check error:
Integration error: secret - Integration 'secret' not found.
I guess secret: is the wrong word here.
What's the correct spelling?

But this information is missing here.

URL

https://www.home-assistant.io/docs/configuration/secrets/

Version

2025.2.5

Additional information

No response

@frenck
Copy link
Member

frenck commented Feb 22, 2025

This is explained right here:

https://www.home-assistant.io/docs/configuration/secrets/#using-secretsyaml

../Frenck

@balconissimo
Copy link
Author

This is explained right here:

No, it is literally NOT explained there. At least there is no clarifivation whether you need that !include thing or not.

I ask because when searching through the internet, I have found contradictory information about this.

Some people add this line to their configuration.yaml:
secrets: !include secrets.yaml
while others don't, and they explain that the above line should not be necessary.
So how comes that? I have tried with and without, and with it I get an error that secrets: (or secret:, I've tried both) is not an integration. So why some people do add it?

Has there been a change in how you use secrets? It should be clarified on the secrets documentaion page.

@catsmanac
Copy link
Contributor

Well, that link provided by @frenck actually describes how to use it, I use it in the way as described in that link, and it works fine for over 2 years.

If the document would need to describe everything one can find on the internet that is either old or incorrect, it would be hardly readable.

@balconissimo
Copy link
Author

I think you misunderstand me. My problem is this "old and incorrect" heap of information that can be found all over the internet.
I'm not demanding instructions for older HA versions, I'm demanding a sort of clarification that the line secrets: !include secrets.yaml IS NO LONGER NEEDED. Which is contrary to older information.

A question to ChatGPT solved my problem.
Maybe the HA developers want to include parts of it, just for clarification that the formerly used !include line is no longer needed and leads to an error.

In Home Assistant 2025.2 you no longer need to include the entry
secrets: !include secrets.yaml
in your configuration.yaml. Home Assistant automatically loads the secrets.yaml file, as long as it is located in the same directory as your configuration.yaml. This was necessary in older versions but has now become superfluous.
So if you already manage your secrets in a separate file and reference them in your configuration using !secret , you can safely omit that entry. This simplifies your configuration and avoids potential issues like double-loading or conflicts.
In short:
Previously: An explicit entry was often needed.
Now (2025.2): Automatic loading means the entry is no longer required.

Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved.
If this issue is still relevant, please let us know by leaving a comment 👍
This issue has now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the Stale The PR had no activity for quite some time, and is marked as Stale label Apr 28, 2025
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
configuration Stale The PR had no activity for quite some time, and is marked as Stale
Projects
None yet
Development

No branches or pull requests

3 participants