Custom component Afvalbeheer - Support for multiple waste collectors

@Pippyn,

Hi Pippyn, will Ophaalkalender get an update at some point in time ?

I see there are really nice features being added to Afvalbeheer, and would truly enjoy those as well in Ophaalkalender (for Belgium) ?

Thanks in anticipation.

Yes, but I’m not sure when… I hope before the end of the year.

In version 2.5.0 of afvalbeheer there’s a new option to display the names of the days in Dutch. By default this option is off.
If you want to activate this feature, add this to your config (after you’ve updated to version 2.5.0):

dutch: 1

Look at the readme on github for more deatils

@Pippyn Just wanted to thank you for this custom component. Just moved, noticed my waste collector is supported by your component, added it, configured it and it works perfectly!

Adding it now to some TTS automations.

1 Like

Looks very nice, sir. Thank you.
I have a small issue which is date format related. I am getting the papier and pbd dates from HVC.
But the papier sensor is not prefixed by the name of the day. Neither the Dutch or the English one (I tried with dutch set to 0 and 1).
Interesting fact is that the papier is being collected at 13-9-2019 and the pbd at 20-9-2019. So, both at Friday. Could this be due to the fact that the papier collection is due in 2 days ? (for the record: it is not being prefixed at all. Not even perhaps the ‘tomorrow’ or ‘morgen’ prefix.)
Edit: It sure has to do with that. in sensor.py at row 363 you do “if date_diff >= 8:”, it seems like you are somehow intentionally not prefixing the date with the dayname. I removed that if and changed the “elif date_diff > 1:” to a regular if. That way I now have 2 collection dates prefixed with the dayname.
the diff for this:

363c363,365
<                             if date_diff > 1:
---
>                             if date_diff >= 8:
>                                 self._state = pick_update.strftime(self.date_format)
>                             elif date_diff > 1:

That doesn’t make sense to me. It should be the other way around.

The code is intended in a way that if a pickup date is more then a week from now it should not add a day prefix. You’re welcome to edit the code and make it function as you want ofcourse. But remember not to update the component as that will revert your changes.

If more people would want this feature I could add an option to disable the check for pickup dates more than a week from now.

I’m sorry I just like the date format this way. Even more because the other date did show the name of the day. It just looks nicer to have two dates in the same format when in a table.
Apart from that I really like the component and would once again like to thank you for the effort you put in this!

1 Like

Hey guys,

Great component! I’m really new to HASS/lovelace and i have no clue how to get the nice card OP has. I only get a bunch of sensors at the top of my HASS ui.

I tried grouping them but no dice…
Can anyone point me in the right direction?

Hi Pippyn
I have a question, how many times is the update of the data? one’s a day and is that adjustable?
(I live in the IJmond and use HVC)
greetings, Henk

It’s done with the monster-card.
This is my moster-card config:

  - type: 'custom:monster-card'
    card:
      entities: []
      show_header_toggle: false
      title: Afvalbeheer
      type: entities
    filter:
      exclude:
        - state: unknown
      include:
        - entity_id: sensor.gft
        - entity_id: sensor.gftgratis
        - entity_id: sensor.papier
        - entity_id: sensor.pmd
        - entity_id: sensor.restafval

1 Like

It will update at least once an hour. You can adjust the time in the code if you want, but I’ve noticed the current setting is quite optimal. And if you update the component, the default update interval will be restored.

If you want to change the frequency, open sensor.py and change line 96:

MIN_TIME_BETWEEN_UPDATES = timedelta(hours=1)

tnx Pippyn for your reply. the program works perfect. i am new with homeassistant and still learning (72 j old:grinning:)

1 Like

Thanks a bunch! Got it working.

Hello Pippyn,

I was checking if I could add the sensor chemisch for my afvalbeheer. But that is not working for my area. If I check online the chemisch is called: Klein Chemisch Afval (KCA)
Is it possible to add this one also to the component?

If you look at the github page you can see kca is supported.
If it’s not working you can send me a pm with a postcode and street number from your area and I’ll have a look.

Thanks, KCA is working.
I only checked the info in the sensor.py. And in that file there is no info about kca.
So thanks for the quick update.

The text ‘None’ and date are in English, but I want it to change into Dutch. How do I do that?

If you’re using afvalbeheer, you can set the option dutch. (In the next update “None” is also translated, release v2.5.2)

1 Like

@Pippyn
Are you aware of this: https://developers.home-assistant.io/docs/en/internationalization_custom_component_localization.html

I was, but I couldn’t get it to work. Do you know of an example where it’s used?