Platform command error, how to fix?

I get an error since latest update of Home assistant and i dont understand how to fix it, I am trying to get the CPU temperature:

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

Results in error:
Configuring the command_line integration by adding platform: command_line under the sensor: key is not supported. The command_line integration must be configured under its own command_line: key instead.

To resolve this:

Remove the following from your YAML configuration file:sensor: - platform: command_line

Move the configuration under the command_line: key instead.

Restart Home Assistant.

Or you could add the System Monitor Integration, and get some more values to deal with like memory, disk and so on.

Command line was moved out of sensor a couple of years ago. You have to configure command line in it’s own yaml section inside configuration.yaml.

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

Thank you so much! This worked!