Mail and Packages is an integration that creates sensors to show mail and package activity from USPS, UPS, and FEDEX. It does so by looking for known in transit and delivery email subject lines from the difference package vendors notification emails.
Your HASS instance will log in to the mail you provide and search for email from the known email address from the shipping vendors and the known subject lines indicating mail or package will be delivered or have been delivered current day.
For USPS Inform Delivery, the image of the mail items are extracted into an animated gif.
It is only capable showing current day activity, mail and packages that are in process of being delivered current day or have been delivered current day.
The integration has come a long way from my original post. Thanks to @firstof9 breathing new life into the project and contributing heavily to the code.
Read more and submit issues in the repository
As a solution to component such as USPS, UPS, and FEDEX breaking or creating connection issues (USPS). I have had a script cobbled together to watch an email inbox for UPS, USPS, and FEDEX notifications emails and then MQTT the information to HASS to track the number of mail pieces and packages to expect. There are other solution that do similar things with added software outside of HASS. I wanted to have something that is all contained inside HASS for the normal user. I have been, through trial and error, attempting to transform this into a platform instead of an external script. I have everything working except importing settings from the configuration yaml. I would like to set up the configuration like this mail_and_packages:
host: !secret mail_host
port: !secret mail_port
username: !secret mail_username
password: !secret mail_password
image_output_path: !secret mail_image_output_path These options are currently hardcoded in the sensor.py file until I can figure out how to import configuration options. I have tried to mimic how other platforms that accept configuration options are set up but I have not been successful. You can see some the attempted commented out in the file. Essential the platform create a sensor for each delivery service and each state checking for the services email address and associates subject. Any help would be appreciated to guide mean the right direction and even code review