Automation not triggering fast enough?

I’m relatively new to home assistant and have a question about an automation I set up.

I wired a mechanical switch to a z-wave door sensor and attached it to my mailbox door so that I can get notifications when the mail is delivered. Everything works great, except that when the door is open and closed quickly, sometimes the automation I set up to notify me doesn’t work. Home assistant still records that the door was opened, but I set up a notification to send a text message to my phone, and this doesn’t seem to trigger.

My automation code is:

- id: '1585251647546'
  alias: Mailbox Door Open
  description: ''
  trigger:
  - entity_id: binary_sensor.mailboxdoor
    to: 'on'
    platform: state
  condition: []
  action:
  - data:
      message: Mailbox Door Open
      title: Mailbox Door Open
    service: notify.mailboxnotify

The home assistant card shows a very thin green sliver where the door was opened, so it is recorded as open for like 1-2 seconds, but the automation doesn’t trigger.

Clipboard01

Anyone have any ideas how to make this more reliable?

Thanks!

It registered the change, so that’ll have been enough.

Things to check:

  1. Push Execute on the automation (find it in Developer tools -> States and select the symbol next to it) - check that works
  2. Look for it in Developer tools -> States and ensure it’s turned on

It definitely triggers when I hit execute, and it even triggers at the mailbox when the door is open for more than a couple seconds. It just seems like my mailman is very fast and although home assistant registers the change, the automation doesn’t always trigger.