Error in Config Yaml

After a recent update in core and/or core an error has come up.
The error was like Command Line YAML has moved. According to post in Github I have the Config YAML

## Cpu Core Temperature

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(2) }}'

On Config check it fails again
Will appreciate help on this.

This is the error on config check

Invalid config for [command_line]: expected a dictionary for dictionary value @ data['command_line'][0]['sensor']. Got None
extra keys not allowed @ data['command_line'][0]['command']. Got 'cat /sys/class/thermal/thermal_zone0/temp'
extra keys not allowed @ data['command_line'][0]['name']. Got 'CPU Temperature'
extra keys not allowed @ data['command_line'][0]['unit_of_measurement']. Got '°C'
extra keys not allowed @ data['command_line'][0]['value_template']. Got '{{ value | multiply(0.001) | round(2) }}'. (See /config/configuration.yaml, line 36).

Your indentation is wrong. :slight_smile:

See here:

Try it like this:

## Cpu Core Temperature
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(2) }}'

Thanks @paddy0174 fixed the indentation issue…

1 Like

Then please mark @paddy0174 's answer as the solution, not your own post!

2 Likes

Oh yes I noticed it could not figure out how to correct the error. I will put in more effort… please bear with me…
Corrected my error, thanks @nickrout !

1 Like