# Changing one sensor to Celsius

Anyone who has 3D printed can probably relate. It’s all done in Celsius, not Fahrenheit. However, I live in USA and we use F, so I can’t use C for everything. Is there a way to convert a single item to C and keep the rest F?

1 Like

I just tried through customizations. It uses the right unit to calculate the graph, but it still shows the wrong unit.

Anyone else?

Well, I can help you get the right value, but I also cannot figure out how to get the displayed unit in HA to be °C.

The solution I came up with, albeit, sketchy and bad practice, is to convert an already converted Fahrenheit value to Celsius…twice, so when home assistant converts it back to °F it is the correct Celsius value.

``````  - platform: template
sensors:
silver_audi_egt_c:
friendly_name: Silver Audi EGT
unit_of_measurement: '°C'
value_template: >
{{ ((((float(states('sensor.silver_audi_egt')) - 32  )  *  5 / 9  ) - 32 ) * 5 / 9 ) | round(2) }}
``````

Hopefully the developers can give us a feature to optionally prevent this automatic conversion in the future (or if one exists document it more openly because I can’t find it anywhere), but I assume they use Celsius so I doubt it’s as annoying to them as it is to us.

Don’t ask why I have an EGT sensor in HA, it’s not ready yet lol.

If someone has a better solution, please share as I’d like to do it properly.

Edit: You can reduce one level of redundancy by changing the expected units to F, then you only need to convert once, still displayed value as F

1 Like

The closest answer I have found so far is, alas, an ugly hack.

HA only converts your °C back to °F if the unit of measurement is exactly that - “°C”. If you’re willing to put up with the slight irritation of having your 3D printer temperature graphs recorded in “deg C” (or other similar not-recognized value) rather than “°C”, you can set that as the unit of measurement on your template sensor, and see the Celsius values just fine.