Custom component Afvalbeheer - Support for multiple waste collectors

That’s fast :slight_smile: I was also looking into it, but I’m kinda stuck on how the final data is supposed to look like. It’s a bit different but not too different to warrant a different sensor I would say.

Awesome! Looking forward to it

Pushed a new version to github. Beta is now merged with master.
New in this version;

  • Optional extra sensors for waste fraction collected today and tomorrow.
  • Option to remove weekday, today or tomorrow in front of date

View readme on github for details.

Tested the new version. Works like a charm! Thanks!

1 Like

Yeah I agree, but that takes some more testing. Will be ready on monday I hope.

Hey Pippyn, a question: how often do your (Groningen-)afvalsensors update? If I have read your code correctly, I think once per hour? Is this correct?

Yes it’s 1 hour between updates.

I made a separate sensor for ophaalkalender, because the api’s were so different and it made the code really messy otherwise. Could you please check if it’s working?
Install instructions:

  • Copy the file ophaalkalender.py to [homeassistant]/config/custom_components/sensor/

  • Add this configuration under your sensors in configuration.yaml (replace ? with your info):

- platform: ophaalkalender
  resources:
    - restafval
    - tuinafval
    - papier
    - pmd
    - grofafval
  postcode: ?
  streetname: ?
  streetnumber: ?

Options:

  • Change the date formatting with:
dateformat: "%d-%m-%Y"
  • change sensor state to date only (e.g. remove “today” in front of date):
dateonly: 1
1 Like

Seems to work! I would just add a few more entries to rename_titles

what do you mean?

Don’t you use the RENAME_TITLES dict to put different names for the same thing together? Groenafval and gft are the same thing afaik

Oh yeah that’s right. I tought GFT was a Dutch thing and you used Groenafval in Flemish. Changed in the new update on github. Now support for the custom updater (follow the instructions here)
Are there more issue’s or changes you would like to see?

2 Likes

works as a gem :slight_smile:

typo:

changed:
vol.Required(CONF_POSTCODE, default=‘straat’): cv.string,
vol.Required(CONF_POSTCODE, default=‘1111’): cv.string,

into:
vol.Required(CONF_STREET_NAME, default=‘straat’): cv.string,
vol.Required(CONF_POSTCODE, default=‘1111’): cv.string,

Thank you, fixed the typo in the new update.

All 3 sensors have been updated for HA 88. Please read the readme for the sensor you use, to view the changes. The “custom updater” links for pre HA 88 and HA 88 and higher are also in the readme.
Afvalbeheer also got two new features;

  • option to remove the waste collector from the sensor name
  • option to use built in icons instead of the ones from your waste collector

NL:
Afvalbeheer
Groningen afvalwijzer
BE:
Ophaalkalender

2 Likes

Hello,
Is it possible to add a second partner for BE ?
(https://limburg.net/afvalkalender)
Thanks alot !
Regards,
Bart Engelen

I will have a look. Do have a postcode and street number for me to test with?

Can you post a sample to setup an automation with your component, would be great to have that included as part of your documentation.

Thank you.


Gemeente: Beringen
Straat: Schaapsweg
Huisnummer: 11