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 %}