mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-18 23:06:58 +00:00
Update automation-action.markdown
This commit is contained in:
parent
72a672519c
commit
dbba708510
@ -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…
x
Reference in New Issue
Block a user