ljmerza / ha-email-sensor

Email Sensor for collecting tracking numbers from over 40 providers.
MIT License
88 stars 23 forks source link

UPS doesn't parse 'My Choice' emails #15

Closed McSwindler closed 5 years ago

McSwindler commented 5 years ago

Version of the custom_component

2.0.1

Configuration

sensor:
  - platform: email
    email: !secret gmail_email
    password: !secret gmail_password

Describe the bug

When signed up for the 'My Choice' service from UPS, the tracking emails come from the address mcinfo@ups.com It doesn't look like this address is setup to be parsed.

ljmerza commented 5 years ago

I'd need a copy of this type of email to get it working. Someone just needs to forward a copy to ljmerza@gmail.com

McSwindler commented 5 years ago

I just forwarded you an example

ljmerza commented 5 years ago

Ok newest version 2.1.0 should work

McSwindler commented 5 years ago

I just got this error message after upgrading:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config.py", line 778, in async_process_component_config
    platform = p_integration.get_platform(domain)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 232, in get_platform
    f"{self.pkg_path}.{platform_name}"
  File "/usr/local/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/config/custom_components/email/sensor.py", line 13, in <module>
    from .const import (
ImportError: cannot import name 'CONF_SMTP_SERVER' from 'custom_components.email.const' (/config/custom_components/email/const.py
ljmerza commented 5 years ago

ah sorry an out of sync thing. fixed in 2.1.1

McSwindler commented 5 years ago

That worked! It picked up the tracking code from the My Choice email.

Thanks!