Skip to content

Commit de4f348

Browse files
Corey Pauleyballoob
Corey Pauley
authored andcommitted
Added documentation for the env_var tag in configuration files (home-assistant#2982)
1 parent 80814f2 commit de4f348

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

source/_docs/configuration/yaml.markdown

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,20 @@ sensor:
6161
state_topic: sensor2/topic
6262
```
6363

64+
### {% linkable_title Using Environment Variables %}
65+
66+
You can include values from your system's environment variables with `!env_var`.
67+
68+
```yaml
69+
http:
70+
api_password: !env_var PASSWORD
71+
```
72+
73+
#### Default Value
74+
75+
If an environment variable is not set, you can fallback to a default value.
76+
77+
```yaml
78+
http:
79+
api_password: !env_var PASSWORD default_password
80+
```

0 commit comments

Comments
 (0)