mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-16 05:46:52 +00:00
Add a TOC to the condition reference (#19156)
Co-authored-by: Joakim Sørensen <hi@ludeeus.dev>
This commit is contained in:
parent
ec82bf75d4
commit
21b47f7bf9
@ -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
|
||||
|
||||
|
@ -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.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user