How to report DHT11 values in celsius

Hi everyone, I’m trying to use DHT11 with home assistant & it works. But I’m getting value in fahrenheit not in celsius. Does anyone know how to get both or Celsius ?

Hi @JackWhatTheF, you can create a second Template Sensor

  - platform: template
        unit_of_measurement: '°C'
        value_template: {{ ((states.sensor.temp_F.state | int - 32) * 5 / 9) | round(1) }}

You have to replace the states.sensor.temp_F.state with your dht11 component state.

1 Like