Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Imitate available variables:
- {% set my_test_json = {
- "temperature": 25,
- "unit": "°C"
- } %}
- The temperature is {{ my_test_json.temperature }} {{ my_test_json.unit }}.
- {% if is_state("device_tracker.paulus", "home") and
- is_state("device_tracker.anne_therese", "home") -%}
- You are both home, you silly
- {%- else -%}
- Anne Therese is at {{ states("device_tracker.anne_therese") }}
- Paulus is at {{ states("device_tracker.paulus") }}
- {%- endif %}
- For loop example:
- {% for state in states.sensor -%}
- {%- if loop.first %}The {% elif loop.last %} and the {% else %}, the {% endif -%}
- {{ state.name | lower }} is {{state.state_with_unit}}
- {%- endfor %}.
- {{ now() }}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement