From 65ef7786dd3fa50eeeaaa58cbf94d7bfd7cd34b4 Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Tue, 21 Dec 2021 12:29:48 +0100 Subject: [PATCH] Document short hand templates in condition actions (#20794) --- source/_docs/scripts/conditions.markdown | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/source/_docs/scripts/conditions.markdown b/source/_docs/scripts/conditions.markdown index 7e9efacc8f8..5075306feff 100644 --- a/source/_docs/scripts/conditions.markdown +++ b/source/_docs/scripts/conditions.markdown @@ -424,7 +424,7 @@ condition: {% endraw %} -But also in the `repeat` action's `while` or `until` option, or in a `choose` action's `conditions` option: +It's also supported in the `repeat` action's `while` or `until` option, or in a `choose` action's `conditions` option: {% raw %} @@ -447,15 +447,15 @@ But also in the `repeat` action's `while` or `until` option, or in a `choose` ac {% endraw %} -
+It's also supported in script or automation `condition` actions: -While conditions can be used in script sequences or automation actions, the -shorthand for template conditions cannot be used directly in those constructs. +{% raw %} -However, if an used action supports conditions itself, like `choose` and - `repeat`, the shorthand template conditions will be accepted in those cases. +```yaml +- condition: "{{ is_state('device_tracker.iphone', 'away') }}" +``` -
+{% endraw %} [template]: /topics/templating/ [automation-templating]: /getting-started/automation-templating/