Displaying Temperature in Celsius Only for Specific Entities

I prefer to use imperial system for environment temperature sensors and HVAC thermostat. However when monitoring temperatures for computer components (CPU, HDD, enclosure, etc.) I prefer to read them in Celsius. The command itself to get CPU temperature is in Celsius but HA is too smart to convert it into Fahrenheit for me.

I have "unit_system": "imperial" in my core.config, and have my CPU temperature entity created as follows:

  - platform: command_line
    name: Nanopi CPU Temperature
    command: cat /sys/class/thermal/thermal_zone0/temp
    unit_of_measurement: '°C'
    value_template: '{{value | multiply(0.001) | round(1) }}'

and the display card looks like:

      - type: 'custom:mini-graph-card'
        entities:
          - sensor.nanopi_cpu_temperature
        line_color: red
        line_width: 8
        hours_to_show: 4
        points_per_hour: 12
        name: CPU Temp

How do I force CPU Temp displayed in Celsius?

1 Like

did you ever figure this out? i’m running into the same issue.

Was there ever a solution found?

I am trying to figure just the opposite - having all temperatures in Celsius but wanting my hot tub in Fahrenheit.

I’m starting to think I’ll have to manually implement the whole functionality of a thermostat, but in manually controlled and converted values.

It makes no sense.

Home assistant doesn’t seem to understand that people don’t use just one system for everything… :man_shrugging:t3:

While I cannot seem to be able to do it for a thermostat (wonder why)
I can changes preferences for entities of the type sensor.
In there, display unit is selectionnable to Fahrenheit, Celsius and Kelvin.

Right now I’ve placed my system in imperial - it turns my thermostat to Fahrenheit. Then I configured weather and sensors to Celsius. Gives me what I need.

Hopefully this may help others.

What do you mean by “smart to convert it into Fahrenheit”?

The sensor gets a value in Celsius, and it is supposed to be displayed in Lovelace w/o any conversion with UoM=“Celsius”.