mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-19 15:26:59 +00:00
added example line of is_state_attr (#1720)
This commit is contained in:
parent
8da12cb9c5
commit
2d9130fd0e
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user