mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-22 16:56:50 +00:00
Add {% raw %} to correctly display templates. (#521)
This commit is contained in:
parent
0b2387a899
commit
88321f3a5e
@ -44,7 +44,7 @@ sensor:
|
||||
platform: template
|
||||
sensors:
|
||||
furnace_on:
|
||||
value_template: {{ states.sensor.furnace.state > 2.5 }}
|
||||
value_template: {% raw %}{{ states.sensor.furnace.state > 2.5 }}{% endraw %}
|
||||
friendly_name: 'Furnace Running
|
||||
sensor_class: heat
|
||||
```
|
||||
@ -59,9 +59,9 @@ binary_sensor:
|
||||
platform: template
|
||||
sensors:
|
||||
movement:
|
||||
value_template: "{{ states.switch.movement.state == 'on' }}"
|
||||
value_template: {% raw %}"{{ states.switch.movement.state == 'on' }}"{% endraw %}
|
||||
sensor_class: motion
|
||||
door:
|
||||
value_template: "{{ states.switch.door.state == 'on' }}"
|
||||
value_template: {% raw %}"{{ states.switch.door.state == 'on' }}"{% endraw %}
|
||||
sensor_class: opening
|
||||
```
|
||||
|
Loading…
x
Reference in New Issue
Block a user