Automations.yaml help

Im getting an error in my automations.yaml, Im pretty sure its my spacing, but I cant seem to figure it out.

- alias: Outside light after dark with Jen home.
  initial_state: True
  hide_entity: False
  trigger:
    - platform: sun
        event: sunset   <- this is the line 6 colume 14 is the :
    - condition:
        condition: state
        entity_id: device_tracker.jen_cell
    state: 'home'
    - action:
      service: light.turn_on
      data:
        entity_id: switch.outside_light_deck_switch

homeassistant hass[5138]: in “/home/homeassistant/.homeassistant/automations.yaml”, line 6, column 14#033[0m
Aug 22 08:43:46 homeassistant hass[5138]: #033[31m2017-08-22 08:43:46 ERROR (MainThread) [homeassistant.bootstrap] Error loading /home/homeassistant/.homeassistant/configuration.yaml: mapping values are not allowed here

There are some errors IMO in spacing and the indents with condition and action, let’s try this:

alias: Outside light after dark with Jen home.
initial_state: True
hide_entity: False
trigger:
  platform: sun
  event: sunset
condition:
  condition: state
  entity_id: device_tracker.jen_cell
  state: 'home'
action:
  service: light.turn_on
  entity_id: switch.outside_light_deck_switch

Thanks!. that worked. no errors.

I think the help pages need to be updated. and I need a better yaml editor.

A really nice editor is Atom in combination with for example the language-yaml package… :slight_smile:

I think the help pages are up to date, no offense… :wink:

Good luck!

thanks! That atom editor was one i saw on a video a few weeks ago. I’ve been searching for it ever since! thanks!