I made a rule to notify me when the mail box door is opened. The rule works as intended, but when someone opens the mailbox door to get the mail, the motion sensor detects this and the rule runs again.
Simple solution is to trigger the alert that the mailbox was opened by the USPS. Then alert and set a variable that USPS opened the mailbox. Then when the rule fires the second time if the variable is set from the first open and don't alert. Then clear the variable.
Trigger: Open Mailbox
If mailboxopen = True
set mailboxopen = False
exit
If mailbox open = False
Set mailboxopen=True
Alerts
Another option is to use a set time as the Trigger and then use a "Wait for Event - Mail motion active" as the first Action.
When is the earliest your mail could arrive? Let's say 9:00 am... Then use "When time is 9:00 am" as your Trigger. Then the rule would wait for the first instance of Mail Motion Acive and then run your steps.
The rule then would not trigger on any additional Mail Motion Active events -- it would just run once a day.
You could even restrict it to run Mon-Sat, but I realize now as I type this that this option can't account for Holidays, so maybe this isn't as cool as I hoped. But additional food for thought!
You could use a Private Boolean to limit the notification to just the first instance of motion active. Basically, it would look like:
Triggers
Motion Active
Actions
If Private Boolean is True,
Set PB to false
Your actions as you currently have them
Else,
Set PB to True
End-IF
In this scenario, the rule runs the first time the motion sensor goes active and sends the alert. The Private Boolean going false means the the next time motion is detected, it moves to the "else" actions. Basically, the second time the motion sensor goes active, it resets the rule by turning the Private Boolean to True so that it will notify on the next motion.
One thing I do suggest is that if you have a goodnight rule (or something similar) make sure that one of the actions is to set this rule's PB to true. That way it is ready to run the next day.