From 5f6e91d665d85b4e20b2d4049292c1efcd5b5ca6 Mon Sep 17 00:00:00 2001 From: Danny Tsang Date: Mon, 15 Dec 2025 11:38:10 +0000 Subject: [PATCH 1/2] Rewrote differences between trigger and automation conditions. Try to explain the differences with an example. --- source/_docs/automation/condition.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/_docs/automation/condition.markdown b/source/_docs/automation/condition.markdown index a60ac11ab68c..d93213a86bd5 100644 --- a/source/_docs/automation/condition.markdown +++ b/source/_docs/automation/condition.markdown @@ -5,7 +5,7 @@ description: "Automations can test conditions when invoked." Conditions are an optional part of an automation rule. They can be used to prevent the automation's actions from being run. After a {% term trigger %} occurred, all conditions will be checked. The automation will be executed if all conditions return `true`. If any of the conditions returns `false`, the automation won't start. -Conditions look very similar to triggers, but they 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 look very similar to triggers, but they are very different — A trigger can observe events that may have happened and start an automation. A condition will only see the current state after the automation is started from the trigger. Take the example of a switch being turned on and then off in quick succession. That switch turned on event will start an automation regardless the fact is now off again. By the time the automation checks the conditions from the switch on event, it may already be off again as its current state. This scenario is also known as a race condition. 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/). From 3a10430587101770ce3db24a3bfd3ab2af3fbe89 Mon Sep 17 00:00:00 2001 From: Danny Tsang Date: Mon, 15 Dec 2025 11:41:03 +0000 Subject: [PATCH 2/2] Reverted capitalised A after the dash. --- source/_docs/automation/condition.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/_docs/automation/condition.markdown b/source/_docs/automation/condition.markdown index d93213a86bd5..3c6b4606290f 100644 --- a/source/_docs/automation/condition.markdown +++ b/source/_docs/automation/condition.markdown @@ -5,7 +5,7 @@ description: "Automations can test conditions when invoked." Conditions are an optional part of an automation rule. They can be used to prevent the automation's actions from being run. After a {% term trigger %} occurred, all conditions will be checked. The automation will be executed if all conditions return `true`. If any of the conditions returns `false`, the automation won't start. -Conditions look very similar to triggers, but they are very different — A trigger can observe events that may have happened and start an automation. A condition will only see the current state after the automation is started from the trigger. Take the example of a switch being turned on and then off in quick succession. That switch turned on event will start an automation regardless the fact is now off again. By the time the automation checks the conditions from the switch on event, it may already be off again as its current state. This scenario is also known as a race condition. +Conditions look very similar to triggers, but they are very different — a trigger can observe events that may have happened and start an automation. A condition will only see the current state after the automation is started from the trigger. Take the example of a switch being turned on and then off in quick succession. That switch turned on event will start an automation regardless the fact is now off again. By the time the automation checks the conditions from the switch on event, it may already be off again as its current state. This scenario is also known as a race condition. 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/).