About Mail and Packages integration
The Mail and Packages integration creates sensors for supported shippers to show a snapshot of mail and packages that are scheduled to be delivered the current day. For the packages that are scheduled for delivery the current day, a count of in transit and delivered packages will be provided. It also generates the number of USPS mail pieces and provides a rotating GIF of the USPS provided images of the mail, if available, for the current day.
How it works
From your instance of HASS, the Mail and Packages integration connects to the email account you supply where your shipment notifications are sent. It reviews all the subject lines of the current day's emails from the supported shippers and counts the subject lines that match known language from the supported shippers about their transit status. For USPS Informed delivery emails, it also downloads the mail images to combine them into a rotating GIF.
The email can not be deleted until the next day. You can have your email filtered into a folder and have the integration watch that folder.
The image will revert back to the no mail graphic after the first email check after midnight, local time.
- All procedures are done locally on your machine.
- No external services are used to process your email.
- No data is sent outside of your local instance of Home Assistant
Search Term Example
|Shipper||Email Address||Subject Math||Body Text Match||Tracking Number|
|USPS||USPSInformeddelivery@informeddelivery.usps.com||Your Daily Digest||none||n/a|
|USPSemail@example.com||Expected Delivery on||out for delivery||Subject|
Please note this list is not a complete listing, please review the const.py for the full details.
Amazon uses a several of the shippers listed above a long with their own contractor delivery crew. When amazon ships through an outside carrier the integration will pick those emails and display the count through that shippers sensors. When Amazon ships through an internal contractor they provide a shipping notification with the body text "will arrive:" about 2 or 3 days before they expect it to be delivered.
The integration scans for these emails the current day and previous 2 days. If the "deliver by:" date matches the current day the value is increased by 1. Amazon now provides a delivered notification* for internal contractor deliveries. These emails are searched for in the current day only the same way the other shipper delivered emails are counted.
Amazon is not fully integrated into the integrations accumulative sensors.