1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-30 06:33:51 +00:00

[substitutions] fix #10825 set evaluation error (#10830)

This commit is contained in:
Javier Peletier
2025-10-01 03:33:56 +02:00
committed by GitHub
parent ab1f8326ee
commit fd3c05b42e
3 changed files with 27 additions and 3 deletions

View File

@@ -5,6 +5,9 @@ substitutions:
var21: '79'
value: 33
values: 44
position:
x: 79
y: 82
esphome:
name: test
@@ -26,3 +29,7 @@ test_list:
- Literal $values ${are not substituted}
- ["list $value", "${is not}", "${substituted}"]
- {"$dictionary": "$value", "${is not}": "${substituted}"}
- |-
{{{ "x", "79"}, { "y", "82"}}}
- '{{{"AA"}}}'
- '"HELLO"'

View File

@@ -8,6 +8,9 @@ substitutions:
var21: "79"
value: 33
values: 44
position:
x: 79
y: 82
test_list:
- "$var1"
@@ -27,3 +30,7 @@ test_list:
- !literal Literal $values ${are not substituted}
- !literal ["list $value", "${is not}", "${substituted}"]
- !literal {"$dictionary": "$value", "${is not}": "${substituted}"}
- |- # Test parsing things that look like a python set of sets when rendered:
{{{ "x", "${ position.x }"}, { "y", "${ position.y }"}}}
- ${ '{{{"AA"}}}' }
- ${ '"HELLO"' }