mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-14 12:56:54 +00:00
Document templating for
in state conditions (#26317)
This commit is contained in:
parent
8bf25d676c
commit
9b17e380cf
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user