@toofewacres wrote:
I am trying to convert a F temperature sensor value to a new C temperature sensor. I have the following code that I am trying, but it only sets the sensor value to the F temperature comes from the original sensor.
- platform: template sensors: octoprint_bed_temp_celsius: friendly_name: 'Bed Temperature' unit_of_measurement: "°C" value_template: "{{ ((states('sensor.octoprint_actual_bed_temp')|float-32)* 5 / 9)|round(1) }}"
If I take the template string to the template developer, it converts the F value to the correct C value. For some reason the sensor code does not put the correct value in the new sensor.
Posts: 5
Participants: 2