Better to use extra brackets in template (#1918)

Current explanation is unclear. Had a problem when trying to convert pressure in mb to pressure in mm according to example: {{ states.sensor.pws_pressure_mb.state | float * 0.720064 | round(0) }}. Problem gone after correction of template to: {{ ( states.sensor.pws_pressure_mb.state | float * 0.720064 ) | round(0) }}
This commit is contained in:
ashev 2017-01-30 15:34:01 +02:00 committed by Fabian Affolter
parent 0a92420ac0
commit 7fd0b7ef89

View File

@ -123,7 +123,7 @@ Print out a list of all the sensor states.
{{ states.sensor.temperature | float + 1 }}
{{ states.sensor.temperature | float * 10 | round(2) }}
{{ (states.sensor.temperature | float * 10) | round(2) }}
{% if states('sensor.temperature') | float > 20 %}
It is warm!