mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-08 18:06:54 +00:00
Merge stop & error script actions (#22402)
This commit is contained in:
parent
02d9817461
commit
55d225f994
@ -821,10 +821,9 @@ Some of the caveats of running actions in parallel:
|
|||||||
|
|
||||||
## Stopping a script sequence
|
## Stopping a script sequence
|
||||||
|
|
||||||
It is possible to halt a script sequence at any point. Using the `stop` or
|
It is possible to halt a script sequence at any point. Using the `stop` action.
|
||||||
`error` action.
|
|
||||||
|
|
||||||
Both actions take a text as input explaining the reason for halting the
|
The `stop` action takes a text as input explaining the reason for halting the
|
||||||
sequence. This text will be logged and shows up in the automations and
|
sequence. This text will be logged and shows up in the automations and
|
||||||
script traces.
|
script traces.
|
||||||
|
|
||||||
@ -835,11 +834,13 @@ for example, a condition is not met.
|
|||||||
- stop: "Stop running the rest of the sequence"
|
- stop: "Stop running the rest of the sequence"
|
||||||
```
|
```
|
||||||
|
|
||||||
The `error` action stops a script as well, but marks the automation
|
There is also an `error` option, to indicate we are stopping because of
|
||||||
|
an unexpected error. It stops the sequence as well, but marks the automation
|
||||||
or script as failed to run.
|
or script as failed to run.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- error: "Well, that was unexpected!"
|
- stop: "Well, that was unexpected!"
|
||||||
|
error: true
|
||||||
```
|
```
|
||||||
|
|
||||||
## Continuing on error
|
## Continuing on error
|
||||||
|
Loading…
x
Reference in New Issue
Block a user