Update automation-action.markdown

This commit is contained in:
Daniel Høyer Iversen 2016-05-20 20:02:46 +02:00
parent 72a672519c
commit dbba708510

View File

@ -47,3 +47,24 @@ automation 2:
data:
message: Oh wow you really missed something great.
```
Conditions can also be part of an action:
```yaml
automation:
- alias: 'Enciende Despacho'
trigger:
platform: state
entity_id: sensor.mini_despacho
to: 'ON'
action:
- condition: or
conditions:
- condition: template
value_template: '{{ states.sun.sun.attributes.elevation < 4 }}'
- condition: template
value_template: '{{ states.sensor.sensorluz_7_0.state < 10 }}'
- service: scene.turn_on
entity_id: scene.DespiertaDespacho
```