Multiple triggers only one action

I have a Xiaomi Vibration Sensor that sends two events when tilted or shaken. I have it mounted on my mailbox, that both shakes and tilts when the mailman opens/closes the mailbox.

As of now, I get two notifications when the mailbox is opened, but I want it only triggering one notification on either one of the two events.

set both events as triggers for the same automation, add a condition to not run if the automation ran in the last 5 sec:

    - condition: template
      value_template: '{{ (as_timestamp(now()) - as_timestamp(state_attr("automation.inser_automation_name_here", "last_triggered") | default(0)) | int > 5)}}'