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

Review the wiki, it tells you how it all works.

Thanks for the help!

I read through everything on the main page of the github site when I set things up, but missed the link to that page. I already received emails from all shipping partners, so also just assumed I was good. Hopefully everything’s good to go now.

Ya Amazon is special because they don’t always use their own delivery drivers.

How do I get the icons to show with the badge?

Can someone post a config example plz? :pray:t5:

Update: I suddenly started getting the individual package emails in addition to my digest email. Now the integration works as expected.

That’s the custom card

New update has broke the integration. Anyone has it working?

Working fine here, what’s the error?

I am trying to set up the Custom Card but since I am in YAML mode I do not have access to the visual editor and recent YAML examples seem sparse. Could someone check my code please? I would just like all the major US carriers tracked and a rotating USPS gif.

Lovelace.yaml

       - type: 'custom:mail-and-packages-card'
         name: Mail Summary
         updated: sensor.mail_updated
         details: true
         image: false
         amazon_packages: sensor.mail_amazon_packages
         camera_entity: camera.mail_amazon_delivery_camera
         gif_sensor: sensor.mail_image_url
         gif: /config/custom_components/mail_and_packages/mail_today.gif
         packages_in_transit: sensor.mail_packages_in_transit
         packages_delivered: sensor.mail_packages_delivered
         deliveries_message: camera.mail_amazon_delivery_camera
         usps_mail: camera.mail_usps_camera
         ups_packages: sensor.mail_ups_packages
         fedex_packages: sensor.mail_fedex_packages
         fedex_delivering: sensor.mail_fedex_delivering
         usps_mail: sensor.mail_usps_mail
         uspsMail: sensor.mail_usps_mail
         usps_packages: sensor.mail_usps_packages
         camera: true       
         camera_entity: camera.mail_usps_camera			

Configuration.yaml

camera:
  - platform: local_file
    file_path: /config/custom_components/mail_and_packages/mail_none.gif
    name: mail_usps

Automation.yaml

- alias: "Update USPS Mail Camera Path on Hass Restart"
  trigger:
    - platform: state
      entity_id: sensor.mail_updated
    - platform: homeassistant
      event: start
  action:
    - service: local_file.update_file_path
      data_template:
        entity_id: camera.mail_usps
        file_path: "{{ states('sensor.mail_image_system_path') }}"
1 Like

The link here to the oauth_2 version is broken? Referring to: OAuth_2

Was this Oauth_2 branch deleted? Which branch to use for Oauth with either gmail or outlook.office365.com? Thanks…

Nope, mine is broken too. It’s been broke at least as much as it’s worked since I’ve had it, I think I’m just going to scrap it and give up.

Ok so like someone up in the chat suggested, I removed ‘Mail Amazon Expception’, and it started working. Very weird.

Oh really?? I never had any issue actually, it was rock solid until the last major update. Now it is very random. It works one day and won’t the other day.

Still a WIP

Yeah, I don’t know. Not sure if it was my installation, or the integration, or what the issue was. But I couldn’t articulate my issues well enough to get any assistance here, so I would just deal with it. Usually it would sort itself our after a few hours, maybe a day. This time? Just broken. No matter what I did or tried, broken. I gave up. It was cool, but honestly, it was more of a novelty. It’s not like it was my garage door opener or location tracking or something like that. An easy write-off.

I have the image showing up in a notification using the URL provided by the integration for the gif but I am not sure how to use the mp4 image as that URL is not provided as a diagnostic sensor.

Androids don’t support gifs in notifications so I only get a still image but if we had an easy way to use the mp4 like the gif then we could get images of all the mail in the android notifications

Use the sensor.mail_image_url sensor and replace the .gif to .mp4 should do the trick.

1 Like

I’m not sure I can do that with the provided automation example

service: notify.notify_all_apps
data:
  title: Mail and Packages
  message: "{{ states('sensor.mail_deliveries_summary')}}"
  data:
    image: "{{ states('sensor.mail_image_url') }}"
    clickAction: entityId:camera.mail_usps_camera
    channel: Mail
    notification_icon: mdi:mailbox-open
    vibrationPattern: 100, 100, 100, 500
    actions:
      - action: URI
        title: Check Mail
        uri: entityId:camera.mail_usps_camera
      - action: URI
        title: Check Amazon
        uri: entityId:camera.mail_amazon_delivery_camera

Try:

    image: "{{ states('sensor.mail_image_url')|replace(".gif",".mp4") }}"

It works in the Dev tools but doesnt work in the actual automation.