Skip to content

Commit

Permalink
Clarified the behavior of conditions. (home-assistant#10461)
Browse files Browse the repository at this point in the history
* Clarified the behavior of conditions. 

The current reading of the documentation indicates that if a condition evaluates to true it stops executing. Added additional context to the first line to describe the actual behavior.

* Updated docs to clarify conditions behavior

The current reading of the documentation indicates that if a condition evaluates to true it stops executing. Added additional context to the first line to describe the actual behavior.

* Renamed script to automation

* Changed to script or automation for consistency.
  • Loading branch information
kdvlr authored and frenck committed Sep 28, 2019
1 parent 54dceaf commit 0daad58
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion source/_docs/automation/condition.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: "Automations can test conditions when invoked."
redirect_from: /getting-started/automation-condition/
---

Conditions are an optional part of an automation rule and can be used to prevent an action from happening when triggered. Conditions look very similar to triggers but are very different. A trigger will look at events happening in the system while a condition only looks at how the system looks right now. A trigger can observe that a switch is being turned on. A condition can only see if a switch is currently on or off.
Conditions are an optional part of an automation rule and can be used to prevent an action from happening when triggered. When a condition does not return true, the automation will stop executing. Conditions look very similar to triggers but are very different. A trigger will look at events happening in the system while a condition only looks at how the system looks right now. A trigger can observe that a switch is being turned on. A condition can only see if a switch is currently on or off.

The available conditions for an automation are the same as for the script syntax so see that page for a [full list of available conditions](/docs/scripts/conditions/).

Expand Down
2 changes: 1 addition & 1 deletion source/_docs/scripts/conditions.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: "Documentation about all available conditions."
redirect_from: /getting-started/scripts-conditions/
---

Conditions can be used within a script or automation to prevent further execution. A condition will look at the system right now. For example a condition can test if a switch is currently turned on or off.
Conditions can be used within a script or automation to prevent further execution. When a condition does not return true, the script or automation will stop executing. A condition will look at the system right now. For example a condition can test if a switch is currently turned on or off.

Unlike a trigger, which is always `or`, conditions are `and` by default - all conditions have to be true.

Expand Down

0 comments on commit 0daad58

Please sign in to comment.