fix !extend example (#3390)

This commit is contained in:
Samuel Sieb 2023-11-20 17:21:36 -08:00 committed by GitHub
parent e59d1dd3e9
commit 246b11a1aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 15 additions and 14 deletions

View File

@ -331,20 +331,6 @@ your configuration file. This can be used to create generic 'template' configura
files (like the ``example.yaml`` above) which can be used for multiple devices,
using substitutions which are provided on the command line.
Extend
------
To make changes or add additional configuration to included configurations ``!extend config_id`` can be used, where ``config_id`` is the ID of the configuration to modify.
For example to set a specific update interval on a common uptime sensor that is shared between configurations:
.. code-block:: yaml
<<: !include common.yaml
sensor:
- id: !extend uptime_sensor
update_interval: 10s
.. _config-packages:
Packages
@ -543,6 +529,21 @@ platform, it could be constructed like this:
- switch.turn_off: open_${door_location}_door_switch
- switch.turn_off: close_${door_location}_door_switch
Extend
------
To make changes or add additional configuration to included configurations ``!extend config_id`` can be used, where ``config_id`` is the ID of the configuration to modify.
For example to set a specific update interval on a common uptime sensor that is shared between configurations:
.. code-block:: yaml
packages:
common: !include common.yaml
sensor:
- id: !extend uptime_sensor
update_interval: 10s
See Also
--------