Temperature showing in F when it should be C

I have a series of sensors which report temperature in F and not in C.
Home assistant does change F to C but its been a long time since I have had to replace the sensor. Ive recently replaced one and after a day it still has not changed to C.The question is how long does this automatic conversion take? Can it be prompted to change?

image

I know that according to this post you have to add the degree symbol for it to convert automatically.

Temperature Desk

- name: "desk_temp"
  state_topic: "rtl_433/43/temperature_F"
  unit_of_measurement: "°F"

123
TarasRegular

Dec '21
It’s the inclusion of °F or °C in unit_of_measurement that serves as a flag for Home Assistant to perform an automatic temperature conversion to the base temperature unit system.
For example, if your Template Sensor’s template performed a conversion from Celsius to Fahrenheit and the result was 20, the automatic conversion would also kick in and produce a final result of -6.7. By dropping the ° symbol, the resulting unit_of_measurement no longer serves as a conversion flag.

From https://community.home-assistant.io/t/displaying-temps-in-both-c-and-f/371099/5

Solution, add this to the sensor statement in configuration.yaml

device_class: temperature

For example:

mqtt:
    sensor:
    
    - name: "desk_temp"
      state_topic: "rtl_433/43/temperature_F"
      unit_of_measurement: "°F"
      device_class: temperature

image

I believe you also need to add a device class of temperature.

It was a long time ago when I configured this. Could you please show me how?

It’s in the post right above the one you linked to.

So to everyone, you need to add to configuration.yaml:

device_class: temperature

For example:

mqtt:
    sensor:
    
    - name: "desk_temp"
      state_topic: "rtl_433/43/temperature_F"
      unit_of_measurement: "°F"
      device_class: temperature

One of the main problems with this forum is that to find information you need to dig through many posts because users assume you know aspects of home assistant and many instructions are not clear at all.

Thank you, I’ve updated the main post and given instructions.