mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-22 16:56:50 +00:00
Updated automation example
Updated to reflect the new single automation block using alias to define each rule within.
This commit is contained in:
parent
f687139fe9
commit
3f66105c80
@ -19,7 +19,7 @@ full configuration but only the relevant part.
|
|||||||
```yaml
|
```yaml
|
||||||
# Example of entry in configuration.yaml
|
# Example of entry in configuration.yaml
|
||||||
automation:
|
automation:
|
||||||
alias: Light on in the evening
|
- alias: 'Rule 1 Light on in the evening'
|
||||||
trigger:
|
trigger:
|
||||||
- platform: sun
|
- platform: sun
|
||||||
event: sunset
|
event: sunset
|
||||||
@ -37,11 +37,24 @@ automation:
|
|||||||
action:
|
action:
|
||||||
service: homeassistant.turn_on
|
service: homeassistant.turn_on
|
||||||
entity_id: group.living_room
|
entity_id: group.living_room
|
||||||
|
|
||||||
|
- alias: 'Rule 2 - Away Mode'
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
- platform: state
|
||||||
|
entity_id: group.all_devices
|
||||||
|
state: 'not_home'
|
||||||
|
|
||||||
|
condition: use_trigger_values
|
||||||
|
condition:
|
||||||
|
action:
|
||||||
|
service: light.turn_off
|
||||||
|
entity_id: group.all_lights
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
<p class='note'>
|
<p class='note'>
|
||||||
All configuration entries have to be sequential. If you have <code>automation:</code>,
|
With the updated automation layout, you are now able to list all rules under on a single `automation:` entry. Use `-alias` to define the start of each rule.
|
||||||
<code>automation 2:</code> and <code>automation 4:</code> then the last one will not be processed.
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
- [Jump to conditions](#conditions)
|
- [Jump to conditions](#conditions)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user