Lovelace: PostNL

Nice project. Thanks a lot!!!

UPDATE

Both the custom component and the card have been updated. If you plan on updating, make sure to update both.

Breaking change:

  • The entities have been renamed. Please review the github repository for the correct configuration

Changes:

  • Ability to see the packages you are distributing
  • Sorting of packages by date
  • Ability to disable the display of already delivered packages
  • In case the date of a package or letter is not known, it shows “Unknown” in the column
  • Ability to change the name and icon of the card
1 Like

I have made a feature request in github and added some suggestions that you can “steal” from another project :wink:

Thanks! will definitely look in to this!

1 Like

Also, for those who believe this card takes a lot of space, what you also can do is the following:

Install the pop-up card: https://github.com/thomasloven/lovelace-popup-card

Display the postNL sensors separately and on click, show the expanded information.

  - icon: mdi:email
    popup_cards:
      sensor.postnl_letters:
        title: Delivery
        card:
          type: "custom:postnl-card"
          letters: sensor.postnl_letters
      sensor.postnl_delivery:
        title: Delivery
        card:
          type: "custom:postnl-card"
          delivery: sensor.postnl_delivery
    cards:
      - type: glance
        title: PostNL
        entities:
          - sensor.postnl_letters
          - sensor.postnl_delivery

UPDATE

The first letter is now being displayed as an image.
Also added the option to disable this.

Requires you to update both the custom component as well as the lovelace card.

1 Like

Awesome!

Hi,

First of all thanks for this card and component. I realy like it!

My card is running perfectly. I only have one remark:

Capture1

All the icons in lovelace have the same colour, only your icons in the card are black. It would be nice if they are the same colour as all other icons.

My second question/problem is that when i click on the postnl_delivery sensor i dont see any adresses or times but only the text: object, object. It is the same for the letters.

Capture

ps, since the requirements are in the manifest.json, you have to remove it from the sensor.py. (line 13, REQUIREMENTS = [‘postnlpy==0.3.0’])

Thanks for your reply. I will check the icons.

In regards to the more info, I can’t solve that. If I solve that, the card becomes obsolete and a lot of information is gone. That’s where this card is for. See also the pop up card above which allows you the best of both worlds.

In regards to you code remark, that is correct, but will break older HA versions. Therefore it stays for now. :slight_smile:

Thanks again for your input!

Ok np, i understand.

Just one small thing. The delivery times from the time window should be swapped :slight_smile:

Capture

Good one! Will fix that.

Update

The Lovelace card has been updated:

  • Swapped the timing of delivery
  • Added a bit more margin below the letter image
  • Matched the color of the icons with the overall template

Anyone who is a master at CSS might fix the design even further. Just create a pull request to the repository. I’m no front-end guru :wink:

1 Like

This looks amazing, been doing it myself with template sensors, but this is much easier to use. Will definitely try this.

1 Like

Update

Thanks all for your feedback! I’ve fixed a tiny issue with images in letters. Although I don’t have the case myself and I don’t have any letters anymore, I hope I didn’t break anything :wink:

Additionally I added the possibility to add this card to custom updater.

I have 2 feature requests left, which are in regards of displaying less delivered packages/letters. Will fix those soon.

Afterwards I hope to update the component in HA itself, so we are rid of the custom component.

2 Likes

Nice, I did the latest update with the custom updater and it worked like a charm. Thanks again for your work.

There is no way to fix this @HA 0.92?

The only way I can think of that, is by making sentences of it like “Package X is on it’s way and will be delivered at Y”. The point is, by making it a sentence, you loose the ability to make automations based on these. I hardly believe also that HA would approve it if we would do a lot of string concatenation within the Python code itself just to make the display of this correct.

Ultimately, the creator of HA suggested to create a custom card: WIP: Expose more information about shipments by PostNL by basbl ¡ Pull Request #18334 ¡ home-assistant/core ¡ GitHub

My suggestion would be to use the combination of this card with the pop-up card, as suggested here:

In the end, Buienradar does the same with forecasts. However, nobody seems to complain about that, since the weather cards actually solve that, hiding the fact that there are objects in the background.

HI,

After having installed the Postnl component successfully, I only see 1 sensor, sensor.postnl.

The sensors you all mention in this thread, postnl_letters, postnl_delivery are not created.
Is there some specific setting I need to enter in the config?

following the docs, I have this:

sensor:
  - platform: postnl
    username: !secret postnl_username
    password: !secret postnl_password

Sounds like we have no choice…

Nope. Config stays the same. You did something wrong with the custom component, so please review your steps again.