Update template condition example
This commit is contained in:
parent
05c3b2b1ce
commit
5f78b4b7bb
1 changed files with 2 additions and 1 deletions
|
@ -111,11 +111,12 @@ The template condition will test if the [given template][template] renders a val
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
condition: template
|
condition: template
|
||||||
value_template: '{% raw %}{{ state.attributes.battery > 50 }}{% endraw %}'
|
value_template: '{% raw %}{{ states.device_tracker.iphone.attributes.battery > 50 }}{% endraw %}'
|
||||||
```
|
```
|
||||||
|
|
||||||
Within an automation, template conditions also have access to the `trigger` variable as [described here][automation-templating].
|
Within an automation, template conditions also have access to the `trigger` variable as [described here][automation-templating].
|
||||||
|
|
||||||
|
[template]: /topics/templating/
|
||||||
[automation-templating]: /getting-started/automation-templating/
|
[automation-templating]: /getting-started/automation-templating/
|
||||||
|
|
||||||
#### {% linkable_title Time condition %}
|
#### {% linkable_title Time condition %}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue