core: PostNL component broken

Home Assistant release with the issue: 0.86.4

Last working Home Assistant release (if known): 0.85.1

Operating environment (Hass.io/Docker/Windows/etc.): Ubuntu Linux 18.04 (kernel 4.15.0-43-generic)

Component/platform: sensor.postnl

Description of problem: Details are no longer displayed in the sensor’s card. Previously this listed packages and their status. screen shot 2019-02-02 at 16 17 39 [object Object] isn’t very helpful

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

sensor
 - platform: postnl
    username: <secret>
    password: <secret>

Traceback (if applicable): n/a

Additional information: It looks like this issue broke it: https://github.com/home-assistant/home-assistant/pull/18334 It looks like there’s a closed issue to revert this commit: https://github.com/home-assistant/home-assistant/pull/20430

From an end user endpoint it’s really crappy to release break functionality (caused by a new/Lovelace UI?) and then say “oh, it needs more development”. It was better before…

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 26 (15 by maintainers)

Most upvoted comments

Someone has made a workaround for PostNL’s stupid lack of a good API.

https://github.com/ToonSoftwareCollective/postnl/blob/master/postnl.sh

I’ve confirmed it to be able to receive a json file with all the post data (packages, can’t check for letters).

some history about this component

@basbl Changed some stuff in #18334 that resulted into [object object] @balloob approved that. He wanted to change something so all known information can be used somewhere else (not well documented in https://github.com/home-assistant/home-assistant/pull/18334#issue-229713762)

@iMicknl Has said that there is now a custom Lovelace card needed for the change there isn’t any information about the Lovelace card in https://www.home-assistant.io/components/postnl/

@peternijssen Came across a possible card https://community.home-assistant.io/t/usps-fedex-ups-custom-ui-card-lovelace-updated-11-27/79648 (documentation and testing is needed)

@TheLastProject Suggested an revert #20430 @balloob Did no approve and suggested to build an Lovelace card.

@peternijssen Came across this https://gathering.tweakers.net/forum/list_message/55934285#55934285 I think it works with the old component but i am not 100% sure.

my opinion

In normal operation it should just work and give package information or there need to be documentation in home-assistant.io. Removing existing information is not the proper way ether. There needs to be documentation or the change (#18334) should not have been approved.

Possible solutions

1. Revert to the old version and let someone document on how to use an new custom Lovelace card and then revert back https://github.com/home-assistant/home-assistant/pull/20430

2. Use my version (#15389) that is the old version but with PostNL letter support (see picture below)

3. Fix the component so it does not look ugly in the UI and accept that there will be no package information

4. Accept the change and enjoy the broken component with the ugly [object object].


postnl lovelace It is the standard package sensor, a standard letter sensor and an group with icon. If you click on the sensor you can see the graph and package information.


sources: https://github.com/home-assistant/home-assistant/pull/18334#issue-229713762 https://github.com/home-assistant/home-assistant/pull/18334#issuecomment-457663600 https://github.com/home-assistant/home-assistant/issues/20696#issuecomment-459974338 https://github.com/home-assistant/home-assistant/pull/20430 https://github.com/home-assistant/home-assistant/issues/20696#issuecomment-466793501 https://github.com/home-assistant/home-assistant/pull/20430#issuecomment-457709797

I did some work this week. First results here, but not yet public: https://community.home-assistant.io/t/lovelace-postnl/112433

@SaturnusDJ I am going to dive into this. I have got an version working with Lovelace.

I just restarted HA on my side and I don’t have that issue over here.

I plan on updating the component in HA, but waiting till my PR is accepted within the original library; https://github.com/iMicknl/python-postnl-api/pull/13

Sorry for the delay. Will create the PR this weekend.

I forked your lib and will create a pull request. 👍

@peternijssen why not fork the original repository and contribute there? Not really nice to copy an open source package fully and not contribute back to the original package… This would also benefit users using the postnl_api package.

Great work by the way with the Lovelace card! Would be nice to have those cards by default in Home Assistant.

I personally would love to see the letters also being displayed. It’s a shame the merge request never got through and the original library is not fully complete/working. I’ll have a look if I can get it all somehow working.