Document short hand templates in condition actions (#20794)

This commit is contained in:
Erik Montnemery 2021-12-21 12:29:48 +01:00 committed by GitHub
parent 45071ecdc0
commit 65ef7786dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 %}
<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/