From 8763565cc193c6155454b22ee77e3dee8ed6f142 Mon Sep 17 00:00:00 2001 From: DubhAd Date: Sun, 25 Feb 2018 08:51:41 +0000 Subject: [PATCH] Fixed template (#4745) The example notify is invalid, missing the required `data_template:` line --- source/_docs/configuration/templating.markdown | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/source/_docs/configuration/templating.markdown b/source/_docs/configuration/templating.markdown index a0d56a158ac..1e26ff126c8 100644 --- a/source/_docs/configuration/templating.markdown +++ b/source/_docs/configuration/templating.markdown @@ -43,12 +43,13 @@ script: msg_who_is_home: sequence: - service: notify.notify - message: > - {% raw %}{% if is_state('device_tracker.paulus', 'home') %} - Ha, Paulus is home! - {% else %} - Paulus is at {{ states('device_tracker.paulus') }}. - {% endif %}{% endraw %} + data_template: + message: > + {% raw %}{% if is_state('device_tracker.paulus', 'home') %} + Ha, Paulus is home! + {% else %} + Paulus is at {{ states('device_tracker.paulus') }}. + {% endif %}{% endraw %} ``` [Jinja2](http://jinja.pocoo.org/) supports a wide variety of operations: