mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-21 08:16:53 +00:00
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:
parent
0a92420ac0
commit
7fd0b7ef89
@ -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!
|
||||
|
Loading…
x
Reference in New Issue
Block a user