Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Sensor for delivered USPS mail. #915

Closed
ClaymoreTech4 opened this issue Jun 20, 2024 · 21 comments · Fixed by #922
Closed

Add Sensor for delivered USPS mail. #915

ClaymoreTech4 opened this issue Jun 20, 2024 · 21 comments · Fixed by #922
Labels
awaiting-feedback Waiting for feedback from the reporter feature New feature or request no-issue-activity Stale issue

Comments

@ClaymoreTech4
Copy link

USPS added the ability to receive an email once mail was delivered.

USPS started new service to receive and email once mail is delivered, below is a screenshot to set it up and the email you receive once you mail is delivered.

It would be fantastic to have a sensor to show Mail delivered to be able to run automations.

Thank you

Screenshot_20240620-105431.png

MAIL DELIVERY NOTIFICATION

 MAIL

View Dashboard

Your mail has been delivered today,
June 18!

Please note that Mail Delivery Notifications are not assurances that a specific mailpiece visible in your Informed Delivery Daily Digest Email or Dashboard has been delivered.

We value your feedback as we seek to continuously improve the accuracy of this feature.  After checking your mailbox today, please tell us about your experience with this notification:

 

You subscribed to this feature with USPS® Product Technology Innovation, 475 L'Enfant Plaza SW, Washington, DC 20260. If you no longer wish to receive Mail Delivery Notifications, you can click here to unsubscribe.

If you need assistance, please email questions or concerns to [email protected].

Copyright© 2024 United States Postal Service®. All Rights Reserved. The Eagle Logo is among the many trademarks of the U.S. Postal Service® . This is an automated email, please do not reply to this message. This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please delete. Any other use of the email by you is prohibited.

USPS.com | Privacy Policy | FAQs

@firstof9 firstof9 added the feature New feature or request label Jun 20, 2024
@firstof9
Copy link
Collaborator

What's the from address and the subject of the email?
This option isn't yet available in my area so I cannot test.

@ClaymoreTech4
Copy link
Author

markup_1000006571.png

@firstof9
Copy link
Collaborator

Notes:

    "usps_mail_delivered": {
        "email": [
            "[email protected]",
            "[email protected]",
            "[email protected]",
            "USPS Informed Delivery",
        ],
        "subject": ["Your Mail Was Delivered"],
    },

Binary Sensor:

    "usps_mail_delivered": BinarySensorEntityDescription(
        name="USPS Mail Delivered",
        key="usps_mail_delivered",
        device_class=BinarySensorDeviceClass.UPDATE,
    ),

@firstof9 firstof9 linked a pull request Jun 22, 2024 that will close this issue
8 tasks
@firstof9
Copy link
Collaborator

Please try 0.3.29b0.

@firstof9 firstof9 added the awaiting-feedback Waiting for feedback from the reporter label Jun 22, 2024
@ClaymoreTech4
Copy link
Author

Installed, Will let you know.

@firstof9
Copy link
Collaborator

Please note the sensor is disabled by default, so you'll need to enable it.

@ClaymoreTech4
Copy link
Author

Yesterday I installed and enabled the sensor before the mail was delivered. The Binary Sensor did not update. Unfortunately I will be out of town starting tomorrow with a mail hold until 07-08-24. Thank you

@firstof9
Copy link
Collaborator

If you can get some debug logs that'd be a big help debugging.

@ClaymoreTech4
Copy link
Author

No problem, I turned on debugging. How often does the integration check gmail?

@firstof9
Copy link
Collaborator

That's user configurable. The default is every 30 mins.

Copy link

github-actions bot commented Jul 7, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@github-actions github-actions bot added the no-issue-activity Stale issue label Jul 7, 2024
@gpeavy
Copy link

gpeavy commented Jul 24, 2024

Notes:

    "usps_mail_delivered": {

        "email": [

            "[email protected]",

            "[email protected]",

            "[email protected]",

            "USPS Informed Delivery",

        ],

        "subject": ["Your Mail Was Delivered"],

    },

Binary Sensor:

    "usps_mail_delivered": BinarySensorEntityDescription(

        name="USPS Mail Delivered",

        key="usps_mail_delivered",

        device_class=BinarySensorDeviceClass.UPDATE,

    ),

I believe the Notes above were not added to the codebase with the sensor.

@firstof9
Copy link
Collaborator

I see them:

"usps_mail_delivered": {
"email": [
"[email protected]",
"[email protected]",
"[email protected]",
"USPS Informed Delivery",
],
"subject": ["Your Mail Was Delivered"],
},

@gpeavy
Copy link

gpeavy commented Jul 24, 2024

My bad. Hmm. I looked at main. Didn't realize the releases are from dev. The sensor is not working for me. I have no mail coming today but I will turn on debug logs for tomorrow.

@gpeavy
Copy link

gpeavy commented Jul 24, 2024

So I get the "Your Mail Was Delivered" email even when there is no mail. I searched the debug logs after the next run of the integration and they do not include the text "Your Mail Was Delivered".

@firstof9
Copy link
Collaborator

does the from address match any of those in the list?

I don't have this option available in my area for USPS, I could use a raw email to improve testing.

If you're using gmail it'll be the option that says "show original" in the 3 dots menu to the right.
You can pass it to me at firstof9 at gmail.com.

@gpeavy
Copy link

gpeavy commented Jul 24, 2024

Email sent. Hope it helps!

@firstof9
Copy link
Collaborator

I'll scrub your PII from it, thanks!

@firstof9
Copy link
Collaborator

firstof9 commented Jul 25, 2024

Ok this should work as expected in 0.4.0b7, make sure you're enabling the sensor in the config called "USPS Mail Delivered" for this sensor to update properly, there's another sensor called "USPS Delivered" which is for packages.

@gpeavy
Copy link

gpeavy commented Jul 27, 2024

image
Is this correct? Am I missing something?

@firstof9
Copy link
Collaborator

Is this correct?

Looks correct, "Mail USPS Delivered" should be the one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-feedback Waiting for feedback from the reporter feature New feature or request no-issue-activity Stale issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants