mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-23 09:17:06 +00:00
Update templating.markdown (#1576)
This commit is contained in:
parent
be9cc2ba25
commit
c939625304
@ -44,13 +44,12 @@ script:
|
||||
msg_who_is_home:
|
||||
sequence:
|
||||
- service: notify.notify
|
||||
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 %}
|
||||
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 width variety of operations:
|
||||
|
Loading…
x
Reference in New Issue
Block a user