tatoosh
(Ta Toosh)
1
Hello,
i coreccted the value of my hue motion temperature sensor:
buro_correct_temp:
friendly_name: "Büro Temperatur"
value_template: '{{ states.sensor.bewegungsmelder_buro.state | float + 1.8 | round(1) }}'
unit_of_measurement: '°C'
But it is not rounded
Büro Temperatur - 23.400000000000002 °
I want 23.40 °
Whats wrong here?
Thanks a lot
tom_l
2
You are only rounding the number 1.8, try:
value_template: "{{ ( states('sensor.bewegungsmelder_buro')|float + 1.8 )|round(1) }}"
Order of operations is:
Filters, then
Parentheses, then
Exponents, then
Multiplication and division, left to right, then
Addition and subtraction, left to right
tatoosh
(Ta Toosh)
3
Thank you! That`s working with the brackets!!