mirror of
https://github.com/esphome/esphome.git
synced 2025-10-30 22:53:59 +00:00
[substitutions] implement !literal (#10785)
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
substitutions:
|
||||
substituted: 99
|
||||
var1: '1'
|
||||
var2: '2'
|
||||
var21: '79'
|
||||
value: 33
|
||||
values: 44
|
||||
|
||||
esphome:
|
||||
name: test
|
||||
test_list:
|
||||
@@ -19,3 +23,6 @@ test_list:
|
||||
- ${ undefined_var }
|
||||
- key1: 1
|
||||
key2: 2
|
||||
- Literal $values ${are not substituted}
|
||||
- ["list $value", "${is not}", "${substituted}"]
|
||||
- {"$dictionary": "$value", "${is not}": "${substituted}"}
|
||||
|
||||
@@ -2,9 +2,12 @@ esphome:
|
||||
name: test
|
||||
|
||||
substitutions:
|
||||
substituted: 99
|
||||
var1: "1"
|
||||
var2: "2"
|
||||
var21: "79"
|
||||
value: 33
|
||||
values: 44
|
||||
|
||||
test_list:
|
||||
- "$var1"
|
||||
@@ -21,3 +24,6 @@ test_list:
|
||||
- ${ undefined_var }
|
||||
- key${var1}: 1
|
||||
key${var2}: 2
|
||||
- !literal Literal $values ${are not substituted}
|
||||
- !literal ["list $value", "${is not}", "${substituted}"]
|
||||
- !literal {"$dictionary": "$value", "${is not}": "${substituted}"}
|
||||
|
||||
Reference in New Issue
Block a user