- alias: "Mail Notif - Mail Delieveries"
initial_state: 'on'
trigger:
#Trigger if mail or packages get updated
- platform: state
entity_id: sensor.mail_usps_mail
- platform: state
entity_id: sensor.mail_usps_delivering
#send only if mail or packages are more than 0
condition:
- condition: or
conditions:
- condition: template
value_template: "{{ (as_timestamp(now()) - as_timestamp(states.sensor.mail_usps_mail.last_changed)) < 15 }}"
- condition: template
value_template: "{{ (as_timestamp(now()) - as_timestamp(states.sensor.mail_usps_delivering.last_changed)) < 15 }}"
action:
- service: notify.YOUR_NOTIFY_METHOD
data_template:
title: "*Today's Mail and Packages*"
message: "{{ states('sensor.mail_deliveries_message')}}"
- service: notify.YOUR_NOTIFY_METHOD
data:
message: "Here is the mail"
data:
document:
file: "/<config path>/images/mail_and_packages/mail_today.gif"
Note that I haven’t tested these modifications yet myself, so YMMV.
So I updated to the latest beta version and noticed that all my entities were unavailable. After trying to set it up again I keep getting at an error on step 2 that says “User input malformed.” I haven’t changed anything for a while now and I can’t get past this step. What am I doing wrong?
Logger: homeassistant.components.sensor
Source: custom_components/mail_and_packages/sensor.py:130
Integration: Sensor (documentation, issues)
First occurred: 8:25:00 AM (1 occurrences)
Last logged: 8:25:00 AM
Error while setting up mail_and_packages platform for sensor
Traceback (most recent call last): File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 178, in _async_setup_platform await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT) File “/usr/local/lib/python3.7/asyncio/tasks.py”, line 442, in wait_for return fut.result() File “/config/custom_components/mail_and_packages/sensor.py”, line 130, in async_setup_entry CONF_GENERATE_MP4: entry.data[CONF_GENERATE_MP4], KeyError: ‘generate_mp4’
This worked, I was able to get past the setup finally but entities still show unavailable after reboot. But the gif shows now.
Logger: homeassistant.components.sensor
Source: custom_components/mail_and_packages/sensor.py:731
Integration: Sensor (documentation, issues)
First occurred: 9:21:09 AM (2 occurrences)
Last logged: 9:50:07 AM
Error while setting up mail_and_packages platform for sensor
Traceback (most recent call last): File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 178, in _async_setup_platform await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT) File “/usr/local/lib/python3.7/asyncio/tasks.py”, line 442, in wait_for return fut.result() File “/config/custom_components/mail_and_packages/sensor.py”, line 137, in async_setup_entry sensors.append(PackagesSensor(data, variable)) File “/config/custom_components/mail_and_packages/sensor.py”, line 268, in init self.update() File “/config/custom_components/mail_and_packages/sensor.py”, line 316, in update self.data.update() File “/usr/src/homeassistant/homeassistant/util/init.py”, line 239, in wrapper result = method(*args, **kwargs) File “/config/custom_components/mail_and_packages/sensor.py”, line 197, in update count[sensor] = get_items(account, “count”) File “/config/custom_components/mail_and_packages/sensor.py”, line 731, in get_items orderNum.append(found[0]) IndexError: list index out of range
Exactly the same issue for me. I’ve just downloaded the component for the first time. Setup completes OK, but I have no entities and the log has the same error.
I’ve tried a couple things and haven’t figured out a way to stream. It may be a limitation of home assistant stream. I think it only supports a certain steam type.
Getting this error. Had to re-do the integration after the recent changes, and since then have been getting this error in my logs. I have no use for this particular entity. Any help to remove or at least stop it from generating the error?
Unknown sensor type: capost_delivering
7:56:34 PM – Mail and Packages (ERROR)