Bad cover.garage automation

I have an automation for closing my garage that is somehow invalided. Been picking at it for about a week now. While it doesn’t break HA, I am getting the error that it isn’t configured right I did have it working for a while now, made an undocumented change and didn’t discover it wasn’t working till after i forgot what I had done. Would you guys mind checking it out. My version for HomeAssistant is 0.33.4. I am splitting my automatons with automation: !include_dir_list automation/

alias: Close Garage Door
trigger:
  - platform: zone
    entity_id: 
      - device_tracker.SUPERSERCERT
    zone: zone.home
    event: leave
#backup closing state/returning home
  - platform: state
    entity_id: device_tracker.android454400fc67e9462a
    from: 'home'
    to: 'not_home'
    for:    
      minutes: 5
#final backup      
  - platform: state
    entity_id: cover.garage
    from: 'closed'
    to: 'open'
    for:
      hours: 2
#coming home      
  - platform: zone
    entity_id: device_tracker.SUPERSERCERT
    zone: zone.home
    event: enter
    for:
      minutes: 10
condition:
  condition: state
  entity_id: cover.garage
  state: 'open'
action:
  service: cover.close_cover
  data:
    entity_id: cover.garage

Probably something so simple but by now I am getting too angry to calmly tackle this.

Post the text of the error.

Why didn’t I look at the logs in the beginning, would have saved me an hour. Anyways here is the error

Invalid config for [automation]: [for] is an invalid option for [automation].

After checking everything out I have narrowed it down to this section.

  - platform: zone
    entity_id: device_tracker.SUPERSERCERT
    zone: zone.home
    event: enter
    for:
      minutes: 10

Works fine with out the for. Are you unable to use for in this instance?

I don’t use the zone platform, so I’m not sure. But I think it only works with events. Your syntax there would suggest it. An event is momentary, different from a state. Do device_trackers have state? Check your states dev tool. If they do, use a state trigger, not a zone. Otherwise, you might be able to make that work with a template_sensor and some time math. Plenty of examples of that type of thing on this forum.