Simple configuration question

I am trying to create 2 sensors.
Created sensors.yaml and included it into configuration.yaml
Getting following error when trying to load this config.
[homeassistant.util.yaml] mapping values are not allowed here
in “/home/homeassistant/.homeassistant/sensors.yaml”, line 3, column 11

Here is the content of sensors.yaml

 # CPU temperature
   - platform: command_line
     name: CPU Temp
     command: 'cat /sys/class/thermal/thermal_zone0/temp'
     value_template: '{{ value }}'
      
   - platform: command_line
     name: CPU Temp2
     command: 'cat /sys/class/thermal/thermal_zone0/temp'
     value_template: '{{ value }}'

What am i doing wrong?

try and put your name in single brackets ‘cpu temp’

1 Like

Figured this one out… turned out the block
name, command, value_template has been indented relatively to platform.

You do not see it in my post but the space was there.

Thanks everyone.