mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-21 16:27:19 +00:00
Update automation-action.markdown (#1833)
Added further explanation on how to use conditions in actions, and added to the example.
This commit is contained in:
parent
7fd0b7ef89
commit
b4a694cb4d
@ -49,7 +49,7 @@ automation 2:
|
||||
```
|
||||
|
||||
|
||||
Conditions can also be part of an action:
|
||||
Conditions can also be part of an action. You can combine multiple service calls and conditions in a single action, and they will be processed in the order you put them in. If the result of a condition is false, the action will stop there so any service calls after that condition will not be executed.
|
||||
|
||||
```yaml
|
||||
automation:
|
||||
@ -59,6 +59,9 @@ automation:
|
||||
entity_id: sensor.mini_despacho
|
||||
to: 'ON'
|
||||
action:
|
||||
- service: notify.notify
|
||||
data:
|
||||
message: Testing conditional actions
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: template
|
||||
|
Loading…
x
Reference in New Issue
Block a user