mirror of
https://github.com/esphome/esphome.git
synced 2026-05-23 19:30:19 +08:00
[substitutions] Fix sibling references inside dict-valued substitutions (#16273)
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
substitutions:
|
||||
device:
|
||||
manufacturer: espressif
|
||||
model: esp32
|
||||
mac_suffix: ffffff
|
||||
name: espressif-esp32-ffffff
|
||||
network:
|
||||
host: example.com
|
||||
port: 8080
|
||||
url: http://example.com:8080/api
|
||||
esphome:
|
||||
name: espressif-esp32-ffffff
|
||||
test_list:
|
||||
- espressif-esp32-ffffff
|
||||
- http://example.com:8080/api
|
||||
- espressif/esp32
|
||||
@@ -0,0 +1,18 @@
|
||||
substitutions:
|
||||
device:
|
||||
manufacturer: "espressif"
|
||||
model: "esp32"
|
||||
mac_suffix: "ffffff"
|
||||
name: ${device.manufacturer}-${device.model}-${device.mac_suffix}
|
||||
network:
|
||||
host: "example.com"
|
||||
port: 8080
|
||||
url: "http://${network.host}:${network.port}/api"
|
||||
|
||||
esphome:
|
||||
name: ${device.name}
|
||||
|
||||
test_list:
|
||||
- ${device.name}
|
||||
- ${network.url}
|
||||
- "${device.manufacturer}/${device.model}"
|
||||
Reference in New Issue
Block a user