Skip to content

Commit c08122c

Browse files
Added an example of using secrets in the config
I couldn't find any mention of using vars from secrets.yaml in the docs so i added one in case some one else finds themselves in the same situation as me.
1 parent a9a027f commit c08122c

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

docs/reference.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1454,6 +1454,20 @@ triggers and application logic, eg:
14541454
14551455
Validating the configuration can be done either manually or with the ``voluptuous`` package.
14561456

1457+
Secrets can also be bound to variables by substituting the value with ``!secret my_secret``. This is useful API keys and passwords needed for services on the network.
1458+
1459+
Here is an example config for ``service_checker`` which needs a name (not a secret) and a URL and an API key:
1460+
1461+
.. code:: yaml
1462+
1463+
pyscript:
1464+
allow_all_imports: true
1465+
apps:
1466+
service_checker:
1467+
- service_name: my_service
1468+
url: !secret my_secret_url
1469+
api_key: !secret my_secret_api_key
1470+
14571471
Access to Hass
14581472
^^^^^^^^^^^^^^
14591473

0 commit comments

Comments
 (0)