Yaml config confusion

i am confused about the proper format for yaml config file. when i added my lifx lights i had to remove the dash in front of platform. this dash is listed in all the examples i can find but HA would fail to load when i had it inserted but when i added darksky i had to put the dash for that platform to work. i dont get it. do i have to play a guessing game for each senor i add to see if it likes a dash?

I was told that if you list more than one automation you need the dash in front of it. One automation would work without the dash but when I put a second automation in HA wouldn’t start until I put the dash. This must be the same thing.

If you have a single item, you can still use a - as long as that’s the item accepts a list. A single item would be a list of one. Just make sure you group light platforms under “light:”.

A snippet. This shows two platforms under light.

light:
  - platform: limitlessled
    bridges:
      - host: 192.168.1.24
        version: 5
        port: 8899
        groups:
        - number: 1
          type: rgbw
          name: Office RGBW
        - number: 2
          type: rgbw
          name: Playroom Accent

  - platform: hue
    host: 192.168.1.105
    allow_unreachable: true
    filename: phue.conf

But this should also work (one light platform):

light:
  - platform: limitlessled
    bridges:
      - host: 192.168.1.24
        version: 5
        port: 8899
        groups:
        - number: 1
          type: rgbw
          name: Office RGBW
        - number: 2
          type: rgbw
          name: Playroom Accent