YAML config error - tracking battery level

Hey.

New to HA. Trying to add a template sensor to the config file. Everytime it the log states an error like this:

17-04-19 22:02:55 ERROR (Thread-1) [homeassistant.util.yaml] while parsing a block mapping
in “/home/homeassistant/.homeassistant/configuration.yaml”, line 49, column 3
expected , but found ‘’
in “/home/homeassistant/.homeassistant/configuration.yaml”, line 53, column 4
17-04-19 22:02:55 ERROR (MainThread) [homeassistant.bootstrap] Error loading /home/homeassistant/.homeassistant/configuration.yaml: while parsing a block mapping
in “/home/homeassistant/.homeassistant/configuration.yaml”, line 49, column 3
expected , but found ‘’
in “/home/homeassistant/.homeassistant/configuration.yaml”, line 53, column 4

The code around those lines looks like this:

I’ve tried mucking about with it. Looking for extra spaces and such. Even when Yamllint says, it’s okay, the error messages pop up in the log, so now I’m a bit lost.

Add a - before platform each time.

sensor:
  - platform: yr
    name: Weather

  - platform: template

See the bottom of the link below for another example.