From 0d47b3f8298fdaa36b0d9b2c935c1ea288ec1b99 Mon Sep 17 00:00:00 2001 From: cryptelli Date: Fri, 15 Mar 2019 18:47:40 +1100 Subject: [PATCH] Additional info on when template triggers fire (#8927) Suggested change to remove any ambiguity when it comes to the conditions on when a template trigger will fire. This misunderstanding of the documentation has been posted on the forums before: Case 1: https://community.home-assistant.io/t/trigger-template-limitation/68663/5 Case 2: https://community.home-assistant.io/t/template-trigger-only-work-in-templates-editor/24962 --- source/_docs/automation/trigger.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/_docs/automation/trigger.markdown b/source/_docs/automation/trigger.markdown index 963fd7d8f7c..c734fab8bf2 100644 --- a/source/_docs/automation/trigger.markdown +++ b/source/_docs/automation/trigger.markdown @@ -172,7 +172,7 @@ A very thorough explanation of this is available in the Wikipedia article about ### {% linkable_title Template trigger %} -Template triggers work by evaluating a [template](/docs/configuration/templating/) 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). +Template triggers work by evaluating a [template](/docs/configuration/templating/) 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). Being a boolean expression the template must evaluate to false before it will fire again. 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 %}`) {% raw %}