Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Add AfterShip sensor for packages #18034
This change addreses the need by:
yes, I learned after publishing this that https://github.com/custom-components/sensor.aftership exists and I think I'll merge its features.
I do though think it would be nice to have a generic all-purpose package tracker (rather than the fairly limited/dedicated ones in there) - hence why suggesting to add it officially.
fyi - delay in updating the PR is due to that after moving to hassio I'm battling this issue: https://community.home-assistant.io/t/runtimeerror-the-processor-time-used-is-not-available-or-its-value-cannot-be-represented/77659
alternatively I could just use the api directly (as its trivial) and avoid the use of clock() in the aftership sdk - suggestions welcome.
Now cleaned this up based on feedback.
I also had to move to using pyaftership rather than aftership's own python sdk as the latter fails when running over a day on a hass.io raspberry (some issue using .clock() calls).
In addition I added a service to call for adding packages - I wanted to add service description but did not find services.yaml for sensors - is that expected ? should I create a new ?
I'll make a corresponding doc tomorrow - time to sleep now ;)
referenced this pull request
Nov 24, 2018
Just noticed the 17track component which does the sensor per package I wanted to do.
I know you prefer small PRS over big ones. Could we commit the current state for this one and then I add the package sensors or you prefer I do it in one go ? Thanks!
left a comment
For the future, please don't squash commits after review has started to make it easier for readers to track changes. We always squash upon merge via github anyway.
Can be merged when build passes.