Skip to content

Commit f892010

Browse files
Fontafabaff
authored andcommitted
added example line of is_state_attr (home-assistant#1720)
1 parent e6ee1f5 commit f892010

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

source/getting-started/automation-trigger.markdown

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ automation:
9595
### {% linkable_title Template trigger %}
9696

9797
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).
98+
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 %}`)
9899

99100
```yaml
100101
automation:

0 commit comments

Comments
 (0)