diff --git a/source/_docs/scripts.markdown b/source/_docs/scripts.markdown index 925ab15e1c0..4635f680a68 100644 --- a/source/_docs/scripts.markdown +++ b/source/_docs/scripts.markdown @@ -1,6 +1,8 @@ --- title: "Script Syntax" description: "Documentation for the Home Assistant Script Syntax." +toc: true +no_toc: true --- Scripts are a sequence of actions that Home Assistant will execute. Scripts are available as an entity through the standalone [Script component] but can also be embedded in [automations] and [Alexa/Amazon Echo] configurations. @@ -27,24 +29,7 @@ script: message: "Turned on the ceiling light!" ``` -- [Call a Service](#call-a-service) - - [Activate a Scene](#activate-a-scene) -- [Variables](#variables) -- [Test a Condition](#test-a-condition) -- [Delay](#delay) -- [Wait](#wait) - - [Wait Template](#wait-template) - - [Wait for Trigger](#wait-for-trigger) - - [Wait Timeout](#wait-timeout) - - [Wait Variable](#wait-variable) -- [Fire an Event](#fire-an-event) - - [Raise and Consume Custom Events](#raise-and-consume-custom-events) -- [Repeat a Group of Actions](#repeat-a-group-of-actions) - - [Counted Repeat](#counted-repeat) - - [While Loop](#while-loop) - - [Repeat Until](#repeat-until) - - [Repeat Loop Variable](#repeat-loop-variable) -- [Choose a Group of Actions](#choose-a-group-of-actions) +{{ page.content | markdownify | toc_only }} ## Call a Service diff --git a/source/_docs/scripts/conditions.markdown b/source/_docs/scripts/conditions.markdown index 7e3590362e0..821e047d178 100644 --- a/source/_docs/scripts/conditions.markdown +++ b/source/_docs/scripts/conditions.markdown @@ -1,6 +1,8 @@ --- title: "Conditions" description: "Documentation about all available conditions." +toc: true +no_toc: true --- Conditions can be used within a script or automation to prevent further execution. When a condition does not return true, the script or automation stops executing. A condition will look at the system at that moment. For example, a condition can test if a switch is currently turned on or off. @@ -9,7 +11,11 @@ Unlike a trigger, which is always `or`, conditions are `and` by default - all co All conditions support an optional `alias`. -## AND condition +{{ page.content | markdownify | toc_only }} + +## Logical conditions + +### AND condition Test multiple conditions in one condition statement. Passes if all embedded conditions are valid. @@ -42,7 +48,7 @@ condition: Currently you need to format your conditions like this to be able to edit them using the [automations editor](/docs/automation/editor/). -## OR condition +### OR condition Test multiple conditions in one condition statement. Passes if any embedded condition is valid. @@ -59,7 +65,7 @@ condition: below: 20 ``` -## MIXED AND and OR conditions +### Mixed AND and OR conditions Test multiple AND and OR conditions in one condition statement. Passes if any embedded condition is valid. This allows you to mix several AND and OR conditions together. @@ -81,7 +87,7 @@ condition: below: 20 ``` -## NOT condition +### NOT condition Test multiple conditions in one condition statement. Passes if all embedded conditions are **not** valid.