I’m using below lines in the configuration. Idea is to generate a rounded number out of 2 sensors to 0.1 accuracy. But figures given in the chart are still not rounded. Also while checking the sensor value itself is giving a not rounded figure. What goes wrong.
template:
- sensor:
- name: “Gewogen Gemiddelde Temperatuur Kamer”
unit_of_measurement: “°C” # Pas aan naar de juiste eenheid als nodig
state: >
{% set temp1 = (states(‘sensor.keuken_temperatuur’) | float) - 0.7 %}
{% set temp2 = states(‘sensor.klimaat_woonkamer_temperatuur_2’) | float %}
{% set lowest = [temp1, temp2] | min %}
{% set highest = [temp1, temp2] | max %}
{{ ((lowest * 9) + highest) / 10 | round(1) }}