added example line of is_state_attr (#1720)

This commit is contained in:
Gianni Fontanini 2017-01-06 09:30:55 +01:00 committed by Fabian Affolter
parent 8da12cb9c5
commit 2d9130fd0e
No known key found for this signature in database
GPG Key ID: E23CD2DD36A4397F

View File

@ -95,6 +95,7 @@ automation:
### {% linkable_title Template trigger %}
Template triggers work by evaluating a [template] on each state change. The trigger will fire if the state change caused the template to render 'true'. This is achieved by having the template result in a true boolean expression (`{% raw %}{{ is_state('device_tracker.paulus', 'home') }}{% endraw %}`) or by having the template render 'true' (example below).
With template triggers you can also evaluate attribute changes by using is_state_attr (`{% raw %}{{ is_state_attr('climate.living_room', 'away_mode', 'off') }}{% endraw %}`)
```yaml
automation: