Mail and Packages: Custom component for UPS, FEDEX, and USPS

@moralmunky @firstof9

Hey everyone! Love the package tracking discussion here. Wanted to share some major updates to the Mail and Packages integration that bring full end-to-end package lifecycle tracking — completely local, no third-party API, no subscription fees.

These will be available once they merge my PR but you can also check my fork if you can’t wait.

For those unfamiliar, Mail and Packages connects to your email via IMAP and automatically detects shipping notifications from 13 carriers: USPS, UPS, FedEx, DHL, Amazon, Canada Post, Royal Mail, Hermes/Evri, Australia Post, Poczta Polska, InPost, DPD, and GLS. It also supports USPS Informed Delivery camera images.

What’s New: Package Registry + Tracker Dashboard

The integration now includes a persistent Package Registry that tracks every package through its full lifecycle:

Detected → In Transit → Out for Delivery → Delivered → Cleared

Packages are automatically registered as they’re found in your email, and their status updates with each scan. The registry persists across restarts and exposes everything as sensor attributes — so you can build automations around delivery events.

Along with the registry, there’s a brand new Package Tracker custom card:


type: custom:mailandpackages-tracker

name: Package Tracker

Drop it on a Panel mode view and you get a full-page tracking dashboard with:

  • Status-grouped sections — Out for Delivery, In Transit, Detected, Delivered (collapsible)

  • Expandable package rows — tap to see carrier, source, timestamps, confirmation status

  • “Track on [Carrier]” links — opens the carrier’s tracking page directly

  • Interactive management — Add Package, Mark Delivered, Clear, Clear All Delivered buttons that call HA services

  • Exception indicators — red warning icon for packages with delivery problems

  • Dark theme support — uses HA CSS variables throughout

  • Mobile responsive — works great on phones and tablets

The Summary Card Got Better Too

The existing summary card (custom:mailandpackages-card) now supports all 13 carriers with badge icons, and has a new show_registry_totals option that displays tracked/in-transit/delivered counts at a glance:


type: custom:mailandpackages-card

name: Mail

show_registry_totals: true

entity_usps_mail: true

entity_usps_packages: true

entity_ups_packages: true

entity_fedex_packages: true

entity_packages_in_transit: true

entity_packages_delivered: true

Why This Approach?

  • 100% local — no cloud API, no third-party service, no account needed

  • Free — no subscription tiers, no per-shipment limits

  • Privacy-first — your tracking data never leaves your network

  • Automatic detection — no manual entry needed (though you can add packages manually too)

  • 13 carriers — broad coverage out of the box, with universal email scanning for others

  • Full HA integration — sensors, service calls, events for automations

Installation

Integration:

Available via HACS — search for “Mail and Packages” or add the repo as a custom repository.

Custom Card:

Add the card repo as a custom HACS repository (Type: Dashboard), then search for “Mail and Packages”.

After installing, enable the Package Registry in the integration’s settings (Settings → Integrations → Mail and Packages → Configure → Advanced Settings).

Links

Would love to hear your feedback! If you run into any issues, feel free to open an issue on GitHub. Happy tracking!

I added the repository as instructed, and installed the Mail and Packages 0.5.0-b1 (last week) (then restarted HA)

however after reloading the interface, tried ctrl+Shift+R as well and even restarting home assistant I get the following error on the dashboard panel card Custom element doesn't exist: mailandpackages-tracker.

I tried to redownload the intergration and picked the highest release 8.0.0 (5 years ago - Beta for .0.3.2) and the problem still persist I noticed that github shows that nothing has been update for the last 5 years (acording to the age of files)

I don’t understand, all of your links take me to original mail and packages repos, where can I find the summary card that you built?

Not sure what update, but now all my entitles for the mail integration show unknown.

My logs show errors but just template errors because the values are Unknown.

Should note if I click on anything in the above I get.

SIde item, is it fair to say that the developer renamed all the entities adding in the email server address into the start of the variable and other changes? If so why?

All of mine now show unknown as well. Not sure what changed?

For me here’s what changed and what a pain to fix all over. I didn’t label them but they are old value and new value. This is for my setup:

binary_sensor.amazon_image_updated
binary_sensor.imap_comcast_net_amazon_image_updated

camera.mail_amazon_delivery_camera
camera.imap_comcast_net_mail_amazon_delivery_camera

sensor.mail_amazon_packages
sensor.imap_comcast_net_mail_amazon_packages

sensor.mail_amazon_packages_delivered
sensor.imap_comcast_net_mail_amazon_packages_delivered

sensor.mail_fedex_delivered
sensor.imap_comcast_net_mail_fedex_delivered

sensor.mail_fedex_delivering
sensor.imap_comcast_net_mail_fedex_delivering

camera.mail_fedex_delivery_camera
camera.imap_comcast_net_mail_fedex_delivery_camera

sensor.mail_fedex_packages
sensor.imap_comcast_net_mail_fedex_packages

camera.mail_generic_delivery_camera
camera.imap_comcast_net_mail_generic_delivery_camera

sensor.mail_grid_image_path
sensor.imap_comcast_net_mail_grid_image_path

sensor.mail_image_system_path
sensor.imap_comcast_net_mail_image_system_path

sensor.mail_image_url
sensor.imap_comcast_net_mail_image_url

sensor.mail_packages_delivered
sensor.imap_comcast_net_mail_packages_delivered

sensor.mail_packages_in_transit
sensor.imap_comcast_net_mail_packages_in_transit

sensor.mail_updated
sensor.imap_comcast_net_mail_updated

camera.mail_ups_camera
camera.imap_comcast_net_mail_ups_camera

sensor.mail_ups_delivered
sensor.imap_comcast_net_mail_ups_delivered

sensor.mail_ups_delivering
sensor.imap_comcast_net_mail_ups_delivering

sensor.mail_ups_packages
sensor.imap_comcast_net_mail_ups_packages

camera.mail_usps_camera
camera.imap_comcast_net_mail_usps_camera

sensor.mail_usps_delivered
sensor.imap_comcast_net_mail_usps_delivered

sensor.mail_usps_delivering
sensor.imap_comcast_net_mail_usps_delivering

sensor.mail_usps_mail
sensor.imap_comcast_net_mail_usps_mail

sensor.mail_usps_packages
sensor.imap_comcast_net_mail_usps_packages

sensor.fedex_packages
sensor.imap_comcast_net_mail_fedex_packages

If you use the mail and package custom card you can not pick the correct entities. I am on the latest b8 and it is still broken.

Hopefully someone can speak to this. I was not aware of the custom card. Would think you could switch to source code view and edit them but not sure. Mine is working but had to go thru pages and pages of customized yaml to fix it all.

The card will need updating for sure.

Thanks for the reply. Any idea why all the sensor names changed? Seems like we are going though a lot of these all through home assistant.

Some users have multiple instances of mail and packages going, and it caused entitiy_id collisions.

In my case the custom card (version 0.06) had been showing unknown the past 2 weeks ish. I’m on version 0.5.1-b14 of the integration. I got some time today to look into why. For reasons unknown to me, my active sensors all have new variable names with a “_2” appended. The old once are there -just unavailable:

Before (showing unknown on everything):

type: custom:mail-and-packages-card
name: Mail Summary
updated: sensor.mail_updated
details: true
image: false
fedex_packages: sensor.mail_fedex_packages
ups_packages: sensor.mail_ups_delivering
usps_packages: sensor.mail_usps_delivering
amazon_packages: sensor.mail_amazon_packages
usps_mail: sensor.mail_usps_mail
camera_entity: camera.mail_usps_camera
deliveries_message: sensor.mail_deliveries_message

After updating (adding the “_2” to the sensor name) by editing in YAML using Show Code Editor on the card configuration:

type: custom:mail-and-packages-card
name: Mail Summary
updated: sensor.mail_updated_2
details: true
image: false
fedex_packages: sensor.mail_fedex_packages_2
ups_packages: sensor.mail_ups_delivering_2
usps_packages: sensor.mail_usps_delivering_2
amazon_packages: sensor.mail_amazon_packages_2
usps_mail: sensor.mail_usps_mail_2
camera_entity: camera.mail_usps_camera_2
deliveries_message: sensor.mail_deliveries_message

I also had to update the “mail_deliveries_message” Device and Services > Helpers > Mine called “Deliveries Summary” > Settings Cog > Template Options. Added the sensor names with “_2” there also. After that all looks good. Not sure what triggered the full sensor duplication, but I think it may have happened during one of the beta integration releases, but honestly wasn’t paying attention.

Now my card is showing all the correct things. I’m going to let it stabilize before I clean up the old unavailable sensors, since there are a lot of them.

Note since installing the latest beta, I’m getting hit pretty heavily with alerts of mail status. Started yesterday after the latest update. Would be 0.5.1-b14.

Double check your automation/entity_ids.

No it’s the update. I reverted back to 0.5.1-b12 and the problem went away. Was telling me we were getting like 18 packages and all kinds of stuff.

If you can get me some debug logs and throw them into a github issue I can see what’s going on.

Been getting things from this company called Veho? Some last leg of the delivery company so think individuals deliver stuff. I find things out there that have been sitting all night as I get no alerts. Any thoughts on baking this into the Mail and Packages custom add-on?

Best way is to open an issue on github with the emails of “out for delivery” and “delivered” with any of your PII redacted.