Include documentation for recursive config include

This commit is contained in:
Lewis Juggins 2016-10-12 08:50:52 +01:00
parent 0b3cec0338
commit dbe8aa444a

View File

@ -196,6 +196,22 @@ We offer four advanced options to include whole directories at once.
- `!include_dir_merge_list` will return the content of a directory as a list by merging all files (which should contain a list) into 1 big list.
- `!include_dir_merge_named` will return the content of a directory as a dictionary by loading each file and merging it into 1 big dictionary.
These work recursively. As an example using `!include_dir_* automation`, will include all 6 files shown below:
```bash
.
└── .homeassistant
├── automation
│   ├── lights
│   │   ├── turn_light_off_bedroom.yaml
│   │   ├── turn_light_off_lounge.yaml
│   │   ├── turn_light_on_bedroom.yaml
│   │   └── turn_light_on_lounge.yaml
│   ├── say_hello.yaml
│   └── sensors
│   └── react.yaml
└── configuration.yaml (not included)
```
#### {% linkable_title Example: `!include_dir_list` %}
@ -377,7 +393,6 @@ automation: !include_dir_merge_list automation/
action:
service: light.turn_on
entity_id: light.entryway
- alias: Automation 2
trigger:
platform: state