mirror of
https://github.com/esphome/esphome.git
synced 2026-05-27 11:56:11 +08:00
[packages] Make package !include vars visible to its substitutions block (#16274)
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
binary_sensor:
|
||||
- platform: template
|
||||
id: front_door_enrolling
|
||||
name: Front Door Enrolling
|
||||
substitutions:
|
||||
enrolling_id: front_door_enrolling
|
||||
enrolling_name: Front Door Enrolling
|
||||
esphome:
|
||||
name: test
|
||||
@@ -0,0 +1,9 @@
|
||||
esphome:
|
||||
name: test
|
||||
|
||||
packages:
|
||||
fingerprint: !include
|
||||
file: 18-package_vars_in_subs_inc.yaml
|
||||
vars:
|
||||
sensor_name: "Front Door"
|
||||
sensor_id_prefix: "front_door"
|
||||
@@ -0,0 +1,8 @@
|
||||
substitutions:
|
||||
enrolling_id: ${sensor_id_prefix}_enrolling
|
||||
enrolling_name: ${sensor_name} Enrolling
|
||||
|
||||
binary_sensor:
|
||||
- platform: template
|
||||
id: ${enrolling_id}
|
||||
name: ${enrolling_name}
|
||||
Reference in New Issue
Block a user