CPU temperature Raspberry Pi

Hello everyone,
I have the following problem. I added this code to the sensors.yaml:

  • platform: command_line
    sensors:
    cpu_temparature:
    command: “cat /sys/class/thermal/thermal_zone0/temp”
    unit_of_measurement: “°C”
    value_template: “{{ value | multiply(0.001) | round(1) }}”

I receive the following error:
Invalid config for [sensor.command_line]: [sensors] is an invalid option for [sensor.command_line]. Check: sensor.command_line->sensors. (See ?, line ?).

What are I doing wrong?

Thank you for your answers.

For the pi, just use this:

1 Like

or this: GitHub - ironsheep/lovelace-rpi-monitor-card: A Raspberry Pi status display Card for Home Assistant Lovelace :wink:

am I right in thinking that won’t work for Hass OS?

I don’t know, not sure, how much HAOS allows you to do…