Really awesome that you guys got it working!
Does anyone know how to get rid of specific text + icons in the lovelace card ?
( I marked it red in the screenshot below ) TY!
Looking at the DHL app, this should be easy. They use a simple POST call to my.dhlparcel.nl/api/user/login with the username and password. The response headers include two cookies (access_token and refresh_token) which are JWT tokens.
https://my.dhlparcel.nl/receiver-parcel-api/parcels returns all parcels.
https://my.dhlparcel.nl/receiver-parcel-api/track-trace?key={TT_CODE}%2B{ZIPCODE}&role=receiver will return the details.
I try to avoid DHL as much as possible, so I am not really able to properly build and test a new version of the integration.
I created a beta release (11.2.0 beta 1). In this release I try to solve an issue which I encountered a couple of times. Sometimes the PostNL API doesn’t return any data (5xx error) or is unreachable. This will break the sensor and therefor the lovelace. I try to solve this by adding a retry strategy. I also changed the behaviour in retrieving data (using async now). This will improve the start time of the integration.
Please test the beta release and let me know if there are (no) issues .
If there is an expected delivery date and time, then this data is added to the delivery data. However, the original lovelace does not show this data. I forked the lovelace and changed the code. In my HA env I can see the data.
You need to do some template magic if you want to create an automation.
Can you describe it more detailed please how you did this? Because I got the postnl integration from arjenbos working but the letters entity is not in there. So how did you solve this with the python api wrapper? Please a short step-by-step procedure would be awesome!
This is not PostNL related, but since we discussed DHL earlier I thought I should share some findings here.
Long story short, I got my DHL packages which are on the way available within Home Assistant through the multiscrape component.
So far it has been running for almost 24 hours and I haven’t seen any issues yet. As my package meanwhile got delivered, I can’t garantuee that it works flawlessly though.
The only issue that is present is whenever you (re)start home assistant, the sensor might be unavailable, but becomes available after reloading the multiscrape configuration.
This is my multiscrape setup. Replace YOUR EMAIL and YOUR PASSWORD with your credentials.
It might also work with the default rest integration. Haven’t tried that.
Of course risking to deviate too much from the PostNL integration (thanks!), I am struggling in getting the DHL code you posted to work.
I get the following errors:
Scraper_noname_1 # Updating failed with exception: Client error '403 Forbidden' for url 'https://my.dhlparcel.nl/receiver-parcel-api/parcels' For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/403
Scraper_noname_0 # Updating failed with exception: Client error '401 Unauthorized' for url 'https://my.dhlparcel.nl/api/user/login' For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/401
Did DHL change something on their end? Or should I have a business account?