Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document short hand templates in condition actions #20794

Merged
merged 1 commit into from
Dec 21, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 7 additions & 7 deletions source/_docs/scripts/conditions.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}

Expand All @@ -447,15 +447,15 @@ But also in the `repeat` action's `while` or `until` option, or in a `choose` ac

{% endraw %}

<div class="note warning">
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') }}"
```

</div>
{% endraw %}

[template]: /topics/templating/
[automation-templating]: /getting-started/automation-templating/
Expand Down