[custom_components.mail_and_packages.helpers] Arrive Date: > Tuesday, January
2022-01-12 14:00:39 INFO (SyncWorker_1) [custom_components.mail_and_packages.helpers] International dates not supported. (time data ‘> Tuesday, January’ does not match format ‘%A, %B %d’)
2022-01-12 14:00:39 DEBUG (SyncWorker_1) [custom_components.mail_and_packages.helpers] Arrive Date: > Tuesday, January
2022-01-12 14:00:39 INFO (SyncWorker_1) [custom_components.mail_and_packages.helpers] International dates not supported. (time data ‘> Tuesday, January’ does not match format ‘%A, %B %d’)
2022-01-12 14:00:39 DEBUG (SyncWorker_1) [custom_components.mail_and_packages.helpers] Arrive Date: > Tuesday, January
2022-01-12 14:00:39 INFO (SyncWorker_1) [custom_components.mail_and_packages.helpers] International dates not supported. (time data ‘> Tuesday, January’ does not match format ‘%A, %B %d’)
The amazon sensor filters thru looking for the time stamp they add to determine when you’re package counter should tick up 1 for the day, the extra > is throwing it off, so I just need to filter that out.
Would you be able to provided one of your forwarded emails with any private info redacted for testing?
Just replace your email address with “[email protected]” and fill in the order like #123-45678-901
Ok I am on a mac so I just downloaded (dragged) it to my desktop and edited with textedit.
Changed my from email to… [email protected]
Changed my To: email to…gmail email to [email protected]
I also changed the Order number to 123-45678-901
I’ve tried reinstalling the integration several times, but I always get this result. Interestingly, after checking the debug logs, the integration seems to be correctly finding the emails. Here’s a little snippet of it finding my USPS Informed Delivery email (I think):
2022-01-13 16:06:24 DEBUG (SyncWorker_5) [custom_components.mail_and_packages.helpers] DEBUG email_search value: ('OK', [b''])
2022-01-13 16:06:24 DEBUG (SyncWorker_5) [custom_components.mail_and_packages.helpers] Searching for (Your item is out for delivery) in (1) emails
2022-01-13 16:06:24 DEBUG (SyncWorker_5) [custom_components.mail_and_packages.helpers] Search for (Your item is out for delivery) count results: 0
2022-01-13 16:06:24 DEBUG (SyncWorker_5) [custom_components.mail_and_packages.helpers] Search for (['[email protected]']) with subject (Expected Delivery on) results: b'' count: 0
2022-01-13 16:06:24 DEBUG (SyncWorker_5) [custom_components.mail_and_packages.helpers] Attempting to find mail from (['[email protected]']) with subject (Out for Delivery)
2022-01-13 16:06:24 DEBUG (SyncWorker_5) [custom_components.mail_and_packages.helpers] DEBUG imap_search: (FROM "[email protected]" SUBJECT "Out for Delivery" SINCE "13-Jan-2022")
2022-01-13 16:06:24 DEBUG (SyncWorker_5) [custom_components.mail_and_packages.helpers] DEBUG email_search value: ('OK', [b''])
2022-01-13 16:06:24 DEBUG (SyncWorker_5) [custom_components.mail_and_packages.helpers] Searching for (Your item is out for delivery) in (1) emails
2022-01-13 16:06:24 DEBUG (SyncWorker_5) [custom_components.mail_and_packages.helpers] Search for (Your item is out for delivery) count results: 0
2022-01-13 16:06:24 DEBUG (SyncWorker_5) [custom_components.mail_and_packages.helpers] Search for (['[email protected]']) with subject (Out for Delivery) results: b'' count: 0
2022-01-13 16:06:24 DEBUG (SyncWorker_5) [custom_components.mail_and_packages.helpers] Sensor: usps_delivering Count: 0
2022-01-13 16:06:24 DEBUG (SyncWorker_5) [custom_components.mail_and_packages.helpers] Attempting to find Informed Delivery mail
2022-01-13 16:06:24 DEBUG (SyncWorker_5) [custom_components.mail_and_packages.helpers] Informed delivery search date: 13-Jan-2022
2022-01-13 16:06:24 DEBUG (SyncWorker_5) [custom_components.mail_and_packages.helpers] DEBUG imap_search: (OR OR FROM "[email protected]" FROM "[email protected]" FROM "[email protected]" SUBJECT "Your Daily Digest" SINCE "13-Jan-2022")
2022-01-13 16:06:25 DEBUG (SyncWorker_5) [custom_components.mail_and_packages.helpers] DEBUG email_search value: ('OK', [b'1 '])
2022-01-13 16:06:25 DEBUG (SyncWorker_5) [custom_components.mail_and_packages.helpers] Cleaning up image directory: /config/custom_components/mail_and_packages/images/
2022-01-13 16:06:25 DEBUG (SyncWorker_5) [custom_components.mail_and_packages.helpers] Checking for overlay files in: /config/custom_components/mail_and_packages/images/
2022-01-13 16:06:25 DEBUG (SyncWorker_5) [custom_components.mail_and_packages.helpers] Copying file to: /config/custom_components/mail_and_packages/images/overlay.png
2022-01-13 16:06:25 DEBUG (SyncWorker_5) [custom_components.mail_and_packages.helpers] Copying file to: /config/custom_components/mail_and_packages/images/vignette.png
2022-01-13 16:06:25 DEBUG (SyncWorker_5) [custom_components.mail_and_packages.helpers] Copying file to: /config/custom_components/mail_and_packages/images/white.png
2022-01-13 16:06:25 DEBUG (SyncWorker_5) [custom_components.mail_and_packages.helpers] Informed Delivery email found processing...
2022-01-13 16:06:25 DEBUG (SyncWorker_5) [custom_components.mail_and_packages.helpers] Extracting image from email
2022-01-13 16:06:25 DEBUG (SyncWorker_5) [custom_components.mail_and_packages.helpers] Removing duplicate images.
2022-01-13 16:06:25 DEBUG (SyncWorker_5) [custom_components.mail_and_packages.helpers] Removing USPS announcement images.
2022-01-13 16:06:25 DEBUG (SyncWorker_5) [custom_components.mail_and_packages.helpers] Image Count: 1
2022-01-13 16:06:25 DEBUG (SyncWorker_5) [custom_components.mail_and_packages.helpers] Resizing images to 724x320...
2022-01-13 16:06:25 DEBUG (SyncWorker_5) [custom_components.mail_and_packages.helpers] Creating array of image files...
2022-01-13 16:06:25 DEBUG (SyncWorker_5) [custom_components.mail_and_packages.helpers] Generating animated GIF
2022-01-13 16:06:25 INFO (SyncWorker_5) [custom_components.mail_and_packages.helpers] Mail image generated.
2022-01-13 16:06:25 DEBUG (SyncWorker_5) [custom_components.mail_and_packages.helpers] Sensor: usps_mail Count: 1
2022-01-13 16:06:25 DEBUG (SyncWorker_5) [custom_components.mail_and_packages.helpers] Sensor: usps_packages Count: 0
2022-01-13 16:06:25 DEBUG (SyncWorker_5) [custom_components.mail_and_packages.helpers] Sensor: zpackages_delivered Count: 0
2022-01-13 16:06:25 DEBUG (MainThread) [custom_components.mail_and_packages] Finished fetching Mail and Packages (imap.mail.yahoo.com) data in 11.730 seconds
Anyone else seen this? Let me know if I can provide any other information. Thanks!
I updated the template for “Deliveries Summary” example so that it only displays if mail or a package is expected. The text was way too long for me, and I didn’t need to know that I’m expecting zero Amazon packages. Planning to display this message on my dashboard. HTH!
sensors:
mail_deliveries_message:
friendly_name: "Deliveries Summary"
value_template: >
{# Deliveries Sentence #}
{% macro deliveries_sentence() -%}
{%- if states("sensor.mail_usps_mail")|int(0) > 0 -%}
{{states("sensor.mail_usps_mail")|int(0)}}{{' '}}
{%- if states("sensor.mail_usps_mail")|int(0) <= 1 -%}
pieces of mail
{%- else -%}
pieces of mail
{%- endif -%}
{{' '}}will be delivered.{{' '}}
{%- endif -%}
{%- if states("sensor.mail_usps_delivering")|int(0) > 0 -%}
{{states("sensor.mail_usps_delivering")|int(0)}}{{' '}}
{%- if states("sensor.mail_usps_delivering")|int(0) == 1 -%}
USPS package is
{%- else -%}
USPS packages are
{%- endif -%}
{{' '}}in transit.{{' '}}
{%- endif -%}
{%- if states("sensor.mail_fedex_delivering")|int(0) > 0 -%}
{{states("sensor.mail_fedex_delivering")|int(0)}}{{' '}}
{%- if states("sensor.mail_fedex_delivering")|int(0) == 1 -%}
FedEx package is
{%- else -%}
FedEx packages are
{%- endif -%}
{{' '}}in transit.{{' '}}
{%- endif -%}
{%- if states("sensor.mail_ups_delivering")|int(0) > 0 -%}
{{states("sensor.mail_ups_delivering")|int(0)}}{{' '}}
{%- if states("sensor.mail_ups_delivering")|int(0) == 1 -%}
UPS package is
{%- else -%}
UPS packages are
{%- endif -%}
{{' '}}in transit.{{' '}}
{%- endif -%}
{%- if states("sensor.mail_amazon_packages")|int(0) > 0 -%}
{{states("sensor.mail_amazon_packages")|int(0)}}{{' '}}
{%- if states("sensor.mail_amazon_packages")|int(0) == 1 -%}
Amazon package is
{%- else -%}
Amazon packages are
{%- endif -%}
{{' '}}in transit.{{' '}}
{%- endif -%}
{%- endmacro %}
{{deliveries_sentence()}}
I’ve noticed that after a restart of HA, Mail and Packages doesn’t pick anything up for that day any longer, so there’s no data until the following day. Presumably this is because it only looks at unread messages? If I log into the mailbox I’m using and mark the messages unread, it will then pick up the data.
Wondering if there’s a way to force it to re-read today’s messages after a restart, or alternately, to store the data locally for the current day so that it persists across reboots?