-
Notifications
You must be signed in to change notification settings - Fork 124
Home
The Mail and Packages integration creates sensors for supported shippers to show a snapshot of mail and packages. It tracks packages currently in transit, packages delivered today, and USPS mail pieces — and generates a rotating GIF and grid image of USPS Informed Delivery mail for the current day.
From your instance of Home Assistant, the integration connects to the email account you supply where your shipment notifications are sent. It reviews subject lines from supported shippers and counts those that match known language about transit status. For USPS Informed Delivery emails, it also downloads mail images and combines them into a rotating GIF and a grid image.
In-transit sensors (_delivering) search a configurable window of past days (default: 3) so packages that shipped before today remain visible until they are delivered. Delivered sensors (_delivered) count only emails from today and reset at midnight.
Emails cannot be deleted until the next day. You can filter emails into a folder and configure the integration to watch that folder instead of the inbox.
The USPS Informed Delivery image reverts to the no-mail graphic after the first email check after midnight, local time.
- All processing is 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.
| Shipper | Email Address | Subject Match | Body Text Match | Tracking Number |
|---|---|---|---|---|
| USPS | USPSInformeddelivery@informeddelivery.usps.com | Your Daily Digest | none | n/a |
| USPS | auto-reply@usps.com | Expected Delivery on | out for delivery | Subject |
| USPS | auto-reply@usps.com | Item Delivered | none | n/a |
This list is not complete — review const.py for full details.
Amazon uses several of the supported shippers as well as their own contractor delivery crew. When Amazon ships through an outside carrier, the integration picks up those emails and displays the count through that shipper's sensors. When Amazon ships through an internal contractor, they provide a shipping notification with the body text "will arrive:" approximately 2–3 days before expected delivery.
The integration scans for Amazon emails across a configurable number of past days (default: 3). If the "deliver by:" date matches the current day the count is incremented. Amazon also provides delivered notifications for internal contractor deliveries, which are counted for today only.
Amazon is not fully integrated into the integration's accumulative sensors.