example added for nesting automations (#16032)

Co-authored-by: Franck Nijhof <git@frenck.dev>
This commit is contained in:
Fredrik 2020-12-28 19:56:58 +01:00 committed by GitHub
parent bc4e1307c7
commit 816af711ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -477,4 +477,22 @@ front_yard:
- camera.front_porch
```
### Example: Combine `!include_dir_merge_list` with `automations.yaml`
You want to go the advanced route and split your automations, but still want to be able to create automations in the UI?
In a chapter above we write about nesting `!includes`. Here is how we can do that for automations.
Using labels like `manual` or `ui` allows for using multiple keys in the config:
`configuration.yaml`
```yaml
# My own handmade automations
automation manual: !include_dir_merge_list automations/
# Automations I create in the UI
automation ui: !include automations.yaml
```
[discord]: https://discord.gg/c5DvZ4e