Expected <block end>, but found '<block mapping start>'

Can someone tell me whats wrong with my automation? I get “expected , but found ‘’” pointing at the “action:”

automation:
trigger:

  • platform: zone
    entity_id: device_tracker.stacey_stacey
    zone: zone.home
    event: enter
    action:
  • service: notify.pushover
    data:
    message: Stacey is Home!
    title: Arriving
    target: Patricksv20

Check your indentation. If you could re-post your config code and use the </> button to format it after posting, I bet someone can help!

I can’t test this at the moment, but it should probably look like this:

automation:
  trigger:
    platform: zone
    entity_id: device_tracker.stacey_stacey
    zone: zone.home
    event: enter
  action:
    - service: notify.pushover
      data:
        message: 'Stacey is Home!'
        title: 'Arriving'
        target: 'Patricksv20'

Yes!, Thank you that was it.

I ran into this error earlier today and i found the easiest way to fix problems like these and other indentation problem in yaml config file.

check out www.yamllint.com!

How it works
Open the URL and copy your yaml configuration file into the blank page and paste (of course, you can tweak your sensitive information so you don’t leak them). What this does is, fix the indentations issues and point out the exact location and by how much space you need to adjust.

To read more indepth documentations about Yaml Lint, click YamlLint!

1 Like