Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

17track.net sensor - 2 errors #161

Closed
2 tasks
brianjking opened this issue Nov 29, 2018 · 1 comment
Closed
2 tasks

17track.net sensor - 2 errors #161

brianjking opened this issue Nov 29, 2018 · 1 comment

Comments

@brianjking
Copy link
Owner

  • Prior to adding any tracking numbers to my 17track.net account at https://buyer.17track.net the sensors were created and the component would successfully load and display in my XX components loaded view in the dev-info view of Home Assistant. This is how I obtained the sensor entity IDs I added to my groups.yaml file that I added here.

  • Once I added packages with valid tracking numbers to my 17track.net dashboard at https://buyer.17track.net I did not see any updates to my frontend so I restarted the Home Assistant service and the 17track.net component no longer loads. I receive the traceback log that I have included below.

Error while setting up platform seventeentrack
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_platform.py", line 128, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT, loop=hass.loop)
  File "/usr/lib/python3.5/asyncio/tasks.py", line 400, in wait_for
    return fut.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
    raise self._exception
  File "/usr/lib/python3.5/asyncio/tasks.py", line 239, in _step
    result = coro.send(None)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/sensor/seventeentrack.py", line 78, in async_setup_platform
    await data.async_update()
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/sensor/seventeentrack.py", line 263, in _async_update
    show_archived=self._show_archived)
  File "/srv/homeassistant/lib/python3.5/site-packages/py17track/profile.py", line 79, in packages
    packages.append(Package(package['FTrackNo'], **kwargs))
  File "<attrs generated init 1e2f778bb8606af2ada9f0ca9f47be0bba6741c6>", line 10, in __init__
    self.__attrs_post_init__()
  File "/srv/homeassistant/lib/python3.5/site-packages/py17track/package.py", line 272, in __attrs_post_init__
    self.package_type = PACKAGE_TYPE_MAP[self.package_type]
KeyError: 'CHICAGO, IL 60640'

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

- platform: seventeentrack
  username: !secret seventeentrackemail
  password: !secret seventeentrackpassword
    - sensor.packages_in_transit_2
    - sensor.packages_ready_to_be_picked_up
    - sensor.packages_not_found
    - sensor.packages_ready_to_be_picked_up

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant