diff --git a/source/_docs/automation.markdown b/source/_docs/automation.markdown index a768be3fe9b..a5826a63323 100644 --- a/source/_docs/automation.markdown +++ b/source/_docs/automation.markdown @@ -47,7 +47,7 @@ When you create a new automation, it will be enabled unless you explicitly add ` Please note that if for some reason Home Assistant cannot restore the previous state, it will result in the automation being enabled. -```text +```yaml automation: - alias: Automation Name initial_state: false @@ -55,6 +55,39 @@ automation: ... ``` +### Automation Modes + +The automation's `mode` configuration option controls what happens when the automation is triggered while the actions are still running from a previous trigger. The default mode is `legacy`. + +Mode | Description +-|- +`legacy` | See [below](#legacy-mode). +`error` | Raise an error. Previous run continues normally. +`ignore` | Do not start a new run. Previous run continues normally. +`parallel` | Start a new, independent run in parallel with previous runs which continue normally. +`restart` | Start a new run after first stopping previous run. +`queue` | Start a new run after all previous runs complete. Runs are guaranteed to execute in the order they were queued. The maximum number of queued up runs is controlled by the `queue_size` configuration option, which defaults to 10. + +#### Example Setting Automation Mode + +```yaml +automation: + - mode: queue + queue_size: 5 + trigger: + ... +``` + +#### Legacy Mode + +