Update templating.markdown (#1576)

This commit is contained in:
Daniel Høyer Iversen 2016-12-10 23:19:37 +01:00 committed by Fabian Affolter
parent be9cc2ba25
commit c939625304

View File

@ -44,13 +44,12 @@ script:
msg_who_is_home: msg_who_is_home:
sequence: sequence:
- service: notify.notify - service: notify.notify
data_template: message: >
message: > {% raw %}{% if is_state('device_tracker.paulus', 'home') %}
{% raw %}{% if is_state('device_tracker.paulus', 'home') %} Ha, Paulus is home!
Ha, Paulus is home! {% else %}
{% else %} Paulus is at {{ states('device_tracker.paulus') }}.
Paulus is at {{ states('device_tracker.paulus') }}. {% endif %}{% endraw %}
{% endif %}{% endraw %}
``` ```
[Jinja2](http://jinja.pocoo.org/) supports a width variety of operations: [Jinja2](http://jinja.pocoo.org/) supports a width variety of operations: