Command Line - CPU Temp - unit_of_measurement changing value

I use a command line sensor to monitor the temp of my RPi CPU. If defined without a unit_of_measurement parameter it works fine. If I define a unit_of_measurement of °C it doubles the value of the sensor and the state is reported in °F. What gives?

- platform: command_line
  name: CPU Temperature
  command: "cat /sys/class/thermal/thermal_zone0/temp"
  value_template: "{{ '%0.1f'|format(value|float|multiply(0.001)) }}"
  unit_of_measurement: '°C'
  scan_interval: 300

Capture1 Capture2

1 Like

Ah ha. This was a new one for me. One of the perils of living near the US border, we tend to mix and match our units. Dropping the degree symbol as we speak. You are a wealth of information and solutions as usual. Thank you.

1 Like