mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-15 13:26:54 +00:00
Update template condition example
This commit is contained in:
parent
05c3b2b1ce
commit
5f78b4b7bb
@ -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…
x
Reference in New Issue
Block a user