Skip to content

Commit 0e990ad

Browse files
committed
Document !literal tag
1 parent 44d305c commit 0e990ad

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

content/components/substitutions.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,21 @@ In addition to the Jinja expressions, ESPHome supports a number of built-in func
151151

152152
{{< anchor "substitute-include-variables" >}}
153153

154+
## Disabling Jinja and substitutions
155+
156+
You can prevent ESPHome from substituting variables or processing Jinja by means of the `!literal` tag before any value:
157+
158+
```yaml
159+
substitutions:
160+
value: "Test Value"
161+
lvgl:
162+
widgets:
163+
- label:
164+
text: !literal "This is a ${value}"
165+
```
166+
167+
In the above example, the value of the `text` property will be, literally, `This is a ${value}`.
168+
154169
## Substitute !include variables
155170

156171
ESPHome's `!include` accepts a list of variables that can be substituted within the included file.

0 commit comments

Comments
 (0)