From 0daad58567c9c2ea7211aa52df7486deec4041e6 Mon Sep 17 00:00:00 2001 From: kdvlr Date: Sat, 28 Sep 2019 02:37:15 -0500 Subject: [PATCH] Clarified the behavior of conditions. (#10461) * 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. --- source/_docs/automation/condition.markdown | 2 +- source/_docs/scripts/conditions.markdown | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/_docs/automation/condition.markdown b/source/_docs/automation/condition.markdown index e276a3ecaa92..76072d2f3ec5 100644 --- a/source/_docs/automation/condition.markdown +++ b/source/_docs/automation/condition.markdown @@ -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/). diff --git a/source/_docs/scripts/conditions.markdown b/source/_docs/scripts/conditions.markdown index 833213f7f116..e7ec0b159f20 100644 --- a/source/_docs/scripts/conditions.markdown +++ b/source/_docs/scripts/conditions.markdown @@ -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.