mirror of
https://github.com/esphome/esphome.git
synced 2026-09-26 22:40:21 +00:00
Co-authored-by: J. Nick Koston <nick@home-assistant.io> Co-authored-by: J. Nick Koston <nick@koston.org>
34 lines
872 B
YAML
34 lines
872 B
YAML
substitutions:
|
|
y: ${x} # Circular reference, expect to pass unresolved.
|
|
x: ${y} # Circular reference, expect to pass unresolved.
|
|
double_height: ${height * 2}
|
|
width: 7
|
|
height: 8
|
|
enabled: true
|
|
pin:
|
|
number: 18
|
|
inverted: true
|
|
area: 25
|
|
numberOne: 1
|
|
var1: 79
|
|
double_width: ${width * 2}
|
|
c: ${b+1}
|
|
b: ${undefined_variable | default(79) }
|
|
|
|
test_list:
|
|
- "The area is ${width * height}"
|
|
- ${width * height}
|
|
- ${width * height} + 1
|
|
- ${enabled and "ENABLED" or "DISABLED"}
|
|
- list: ${ [width, height] }
|
|
- "${ {'width': width, 'height': height} }"
|
|
- ${pin}
|
|
- The pin number is ${pin.number}
|
|
- The square root is: ${math.sqrt(area)}
|
|
- The number is ${var${numberOne} + 1}
|
|
- ord("a") = ${ ord("a") }
|
|
- chr(97) = ${ chr(97) }
|
|
- len([1,2,3]) = ${ len([1,2,3]) }
|
|
- width = ${width}, double_width = ${double_width}
|
|
- a = ${a}
|