Seems that a time pattern check could work although I’ve not received any iOS push notifications in the past 24 hrs but do see in the logs that the mail and packages is updating every 15 minutes. I don’t have any deliveries in transit either.
# NOTIFY IF MAIL IS EXPECTED
- alias: "Mail Notify - Mail Deliveries"
initial_state: 'on'
trigger:
- platform: time_pattern
hours: /2 # repeat every 2 hrs.
- platform: state # Trigger if mail or packages get updated
entity_id: sensor.mail_usps_mail
- platform: state
entity_id: sensor.mail_usps_delivering
condition:
condition: and
conditions:
- condition: time # Time condition between 7AM - 9PM
after: '07:00:00'
before: '21:00:00'
- condition: or # Send only if mail or packages are more than 0
conditions:
- condition: template
value_template: "{{ states('sensor.mail_usps_mail') | int > 0 }}"
- condition: template
value_template: "{{ states('sensor.mail_usps_delivering') | int > 0 }}"
action:
...
Hoping that someone can help with the image generation. I feel like it’s almost there but there’s just something misconfigured somewhere. I’m running HASS on Windows. The HASS directory is ....\.homeassistant
The integration is at: \.homeassistant\custom_components\mail_and_packages
According to the log: INFO (SyncWorker_4) [custom_components.mail_and_packages.sensor] Mail image generated.
But I don’t see the images anywhere. In the integration the mail images path is set up as: /config/www/mail_and_packages/. I was following the examples but do I need something different specifically for a Windows environment? The \.homeassistant\www\mail_and_packages dir is currently empty.
I am right in thinking that in order to display the image of today’s mail, you need to either:
Use the custom Lovelace card and set it’s ‘gif’ property appropriately, OR
Define a camera pointing to a local file (and if using random gif names then have an automation that updates the local file name based on the mail sensor’s ‘image’ attribute).
For option 1, is the random image name feature supported? I tried setting ‘gif’ to something like:
hi,
how much effort does it take to integrate other parcel services?
I am living in germany and would want to integrate DHL, GLS, DPD and Hermes. I already created a feature request for this, before I was pointed to this integration.