Worked for me as well. Thanks @happyleaves
I don’t have a myusps folder in the deps directory.
Any ideas?
This is the one that needs updating
That worked
Is it the same situation with the ups sensor?
I’m getting the following error after reboot but, USPS package info is displayed in the front end.
2017-06-08 00:17:08 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.4/site-packages/myusps/init.py”, line 176, in wrapped
return function(*args)
File “/srv/homeassistant/lib/python3.4/site-packages/myusps/init.py”, line 229, in get_mail
container = _require_elem(response, INFORMED_DELIVERY_TAG, INFORMED_DELIVERY_ATTRS)
File “/srv/homeassistant/lib/python3.4/site-packages/myusps/init.py”, line 86, in _require_elem
raise USPSError(‘Not logged in’)
myusps.USPSError: Not logged in
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/usr/lib/python3.4/asyncio/tasks.py”, line 233, in _step
result = coro.throw(exc)
File “/srv/homeassistant/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py”, line 361, in async_process_entity
new_entity, self, update_before_add=update_before_add
File “/srv/homeassistant/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py”, line 191, in async_add_entity
yield from self.hass.loop.run_in_executor(None, entity.update)
File “/usr/lib/python3.4/asyncio/futures.py”, line 388, in iter
yield self # This tells Task to wait for completion.
File “/usr/lib/python3.4/asyncio/tasks.py”, line 286, in _wakeup
value = future.result()
File “/usr/lib/python3.4/asyncio/futures.py”, line 277, in result
raise self._exception
File “/usr/lib/python3.4/concurrent/futures/thread.py”, line 54, in run
result = self.fn(*self.args, **self.kwargs)
File “/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/sensor/usps.py”, line 124, in update
self._state = len(myusps.get_mail(self._session))
File “/srv/homeassistant/lib/python3.4/site-packages/myusps/init.py”, line 179, in wrapped
_login(args[0])
File “/srv/homeassistant/lib/python3.4/site-packages/myusps/init.py”, line 156, in _login
raise USPSError(‘authentication failed’)
myusps.USPSError: authentication failed
I also tried to customize the name, which took no effect.
sensor.ups:
name: UPS
USPS is now divided into two sensors. One for packages and the other for mail. It looks like you are signed up for the Package dashboard service but not the Informed Delivery that shows how many pieces of mail are coming.
https://home-assistant.io/components/sensor.usps/
For the name, you can set it up on configuration.yaml:
- platform: ups
name: UPS
or customize.yaml:
sensor.ups:
#icon: mdi:package-variant-closed
friendly_name: UPS
Got it, missed the friendly part.
Any way to display the “in_transit” attribute in the same card?
Thanks again, appreciate it.
@J-CMartin
Available attribute for USPS:
USPS packages
4 minutes ago
2
departed usps origin facility
1
arrived at post office
1
Available attributes for UPS:
UPS
5 minutes ago
1
in transit
1
“Today’s deliveries” and “Packages in Transit” count are based on @happyleaves configuration that he shared earlier:
https://github.com/happyleavesaoc/my-home-automation/blob/master/homeassistant/packages/deliveries.yaml
What I’m asking, is can I display that info in the same card under UPS and USPS?
So it would look something like:
UPS 1
Status in transit
Or
UPS 1 in transit
Yes, use a template sensor
I receive the below error for Packages in Transit:
[homeassistant.components.sensor.template] Could not render template Packages in Transit, the state is unknown.
It requires that the 3 sensors (ups, fedex and usps) have a value. If one of them is missing of failed to load, the “state is unknown” error will show up unless you edit the template and remove the one you don’t need/use.
Awesome good to know. They all finally started working
Still getting the login error today.
It was working, did a reboot, and now the following.
2017-06-09 17:01:44 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.4/site-packages/myusps/init.py”, line 176, in wrapped
return function(*args)
File “/srv/homeassistant/lib/python3.4/site-packages/myusps/init.py”, line 229, in get_mail
container = _require_elem(response, INFORMED_DELIVERY_TAG, INFORMED_DELIVERY_ATTRS)
File “/srv/homeassistant/lib/python3.4/site-packages/myusps/init.py”, line 86, in _require_elem
raise USPSError(‘Not logged in’)
myusps.USPSError: Not logged in
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/usr/lib/python3.4/asyncio/tasks.py”, line 233, in _step
result = coro.throw(exc)
File “/srv/homeassistant/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py”, line 361, in async_process_entity
new_entity, self, update_before_add=update_before_add
File “/srv/homeassistant/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py”, line 191, in async_add_entity
yield from self.hass.loop.run_in_executor(None, entity.update)
File “/usr/lib/python3.4/asyncio/futures.py”, line 388, in iter
yield self # This tells Task to wait for completion.
File “/usr/lib/python3.4/asyncio/tasks.py”, line 286, in _wakeup
value = future.result()
File “/usr/lib/python3.4/asyncio/futures.py”, line 277, in result
raise self._exception
File “/usr/lib/python3.4/concurrent/futures/thread.py”, line 54, in run
result = self.fn(*self.args, **self.kwargs)
File “/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/sensor/usps.py”, line 124, in update
self._state = len(myusps.get_mail(self._session))
File “/srv/homeassistant/lib/python3.4/site-packages/myusps/init.py”, line 179, in wrapped
_login(args[0])
File “/srv/homeassistant/lib/python3.4/site-packages/myusps/init.py”, line 167, in _login
raise USPSError(error.text.strip())
myusps.USPSError: We have encountered an error. Please try again.
there was an error for me yesterday but it worked again today…
Anyone every get anywhere with this? Mine is still broken. I’ve deleted the pickle file and also replaced the _init_.py with the one linked above. It’s still blowing up:
AttributeError: 'NoneType' object has no attribute 'find'
2017-06-21 22:11:54 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/root/.homeassistant/deps/myusps/__init__.py", line 176, in wrapped
return function(*args)
File "/root/.homeassistant/deps/myusps/__init__.py", line 229, in get_mail
container = _require_elem(response, INFORMED_DELIVERY_TAG, INFORMED_DELIVERY_ATTRS)
File "/root/.homeassistant/deps/myusps/__init__.py", line 86, in _require_elem
raise USPSError('Not logged in')
myusps.USPSError: Not logged in
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.4/asyncio/tasks.py", line 233, in _step
result = coro.throw(exc)
File "/usr/local/lib/python3.4/dist-packages/homeassistant/helpers/entity_component.py", line 368, in async_process_entity
new_entity, self, update_before_add=update_before_add
File "/usr/local/lib/python3.4/dist-packages/homeassistant/helpers/entity_component.py", line 199, in async_add_entity
yield from self.hass.async_add_job(entity.update)
File "/usr/lib/python3.4/asyncio/futures.py", line 388, in __iter__
yield self # This tells Task to wait for completion.
File "/usr/lib/python3.4/asyncio/tasks.py", line 286, in _wakeup
value = future.result()
File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
raise self._exception
File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.4/dist-packages/homeassistant/components/sensor/usps.py", line 124, in update
self._state = len(myusps.get_mail(self._session))
File "/root/.homeassistant/deps/myusps/__init__.py", line 179, in wrapped
_login(args[0])
File "/root/.homeassistant/deps/myusps/__init__.py", line 167, in _login
raise USPSError(error.text.strip())
myusps.USPSError: We have encountered an error. Please try again.
Tagging @happyleaves
Are you on 0.47
?