Document templating for in state conditions (#26317)

This commit is contained in:
Erik Montnemery 2023-02-20 19:14:51 +01:00 committed by GitHub
parent 8bf25d676c
commit 9b17e380cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -321,6 +321,24 @@ condition:
state: input_select.guest_mode
```
You can also use templates in the `for` option.
{% raw %}
```yaml
condition:
condition: state
entity_id: device_tracker.paulus
state: "home"
for:
minutes: "{{ states('input_number.lock_min')|int }}"
seconds: "{{ states('input_number.lock_sec')|int }}"
```
{% endraw %}
The `for` template(s) will be evaluated when the condition is tested.
### Sun condition
#### Sun state condition