Alerts happen randomly but automations are consistent

I have both an Alert and an Automation setup to tell me when a door is open. The automation always emails me after 5 minutes and works fine. The alert doesn’t always email me. When it does, sometimes it’s 4 hours after the door state changes to “open”. Am I doing something wrong?

sensor basementdoor:
  platform: mqtt
  name: Basement Door
  state_topic: sensor/switch600194013092
  qos: 0


alert:
  basementdoor:
    name: Basement Door Open
    entity_id: sensor.basement_door
    state: 'open'
    repeat: 2
    skip_first: True
    notifiers:
      - gremail


automation basementdoor:
  alias: Basement Door Status
  trigger:
    - platform: state
      entity_id: sensor.basement_door
      state: 'open'
      for:
        minutes: 5
  action:
    - service: notify.gremail
      data:
        title: Home Assistant Door Open!
        message: Basement was left open! (automation)