mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-10 19:06:55 +00:00
Clarification regarding the frequency... (#4280)
It's often been noted in the forums that Template Triggers are sometimes overload and that you want to use them sparingly. I haven't stress tested my system with this idea, but if the template triggers are tested every time any state changes, then that is the clarification that I've proposed in the documentation.
This commit is contained in:
parent
cd0900496c
commit
e777af9ea1
@ -138,7 +138,7 @@ The US Naval Observatory has a [tool](http://aa.usno.navy.mil/data/docs/AltAz.ph
|
|||||||
|
|
||||||
### {% linkable_title Template trigger %}
|
### {% 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).
|
Template triggers work by evaluating a [template] on every state change for all of the recognized entities. 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 %}`)
|
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
|
```yaml
|
||||||
|
Loading…
x
Reference in New Issue
Block a user