I see in the docs that the secrets file can be used to protect personal info so I’m trying to add more personal info other than just passwords but getting parsing errors in yaml.
If I post an automation (like the case above) it will also include all the email addresses used in the automation. These posts are public. Usually I redact the personal info but the docs for secrets indicate that I should be able to avoid this issue by creating an entry in secrets.yaml. The docs are rather vague though.
Need to try and see if I can see what’s happening at a SMTP level, tried formatting the email with different delimiters, but the didn’t solve the problem.
So the associated values for the secrets are stored in secrets.yaml and then referenced in a helper? Still not sure how to use them in an automation? Honestly, not sure how this works at all?
He is suggesting you reveal the secret information in the attributes of a Template Sensor. Then your automation references the attributes using the state_attr() function.
This technique makes your secret information visible in the UI (such as in Developer Tools → States). If you don’t mind having the information visible in the UI then, arguably, you don’t need to use secrets.yaml and can simply hardcode the information directly in the Template Sensor.
If you don’t want the information to be visible, then his suggestion is not for you.
Thanks everyone for the info. I hadn’t realized that secrets.yaml would be so hard to make use of in Home Assistant. It’s so easy to use in ESPHome (just works😁).
I think my best solution will be to just continue redacting my posts and hope I don’t miss anything. Having multiple files for automations would likely get complicated really fast, not to mention the lack of ability to test them, and I have no skills when it comes to coding in json.