From 5f78b4b7bb48ef16dea889494388f37a2a85861b Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Sat, 30 Jul 2016 12:56:11 -0700 Subject: [PATCH] Update template condition example --- source/getting-started/scripts-conditions.markdown | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/getting-started/scripts-conditions.markdown b/source/getting-started/scripts-conditions.markdown index 1b76db53d6a..11beeabadbf 100644 --- a/source/getting-started/scripts-conditions.markdown +++ b/source/getting-started/scripts-conditions.markdown @@ -111,11 +111,12 @@ The template condition will test if the [given template][template] renders a val ```yaml condition: template -value_template: '{% raw %}{{ state.attributes.battery > 50 }}{% endraw %}' +value_template: '{% raw %}{{ states.device_tracker.iphone.attributes.battery > 50 }}{% endraw %}' ``` Within an automation, template conditions also have access to the `trigger` variable as [described here][automation-templating]. +[template]: /topics/templating/ [automation-templating]: /getting-started/automation-templating/ #### {% linkable_title Time condition %}