Update automation-action.markdown
This commit is contained in:
parent
72a672519c
commit
dbba708510
1 changed files with 21 additions and 0 deletions
|
@ -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
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue