Garbage pickup date (mijnafvalwijzer.nl) custom_component

SCAN_INTERVAL is being used and MIN_TIME_BETWEEN_UPDATES limits the amount of updates.
So what actually happens is afvalwijzer only updating once per hour. When you put debug logging on, you’ll see what is actually happening. Maybe something else is slowing down your system. I removed these values before, but due to reponsive issues I re-added those values again.

If I remove SCAN_INTERVAL, and restart HASS, then HASS will only update afvalwijzer after an hour, not sooner.

yes, I noticed that too…and even now it doesn’t always initiate at startup, will test some more to see if an error is thrown or something else is amiss.

nope, nothing happens at startup:

2020-02-18 12:13:02 DEBUG (MainThread) [custom_components.afvalwijzer.sensor] Trash type list = ['gft', 'plastic verpakkingsafval', 'restafval', 'papier', 'today', 'tomorrow', 'first_next_in_days', 'first_next_item', 'first_next_date', 'day_after_tomorrow']
2020-02-18 12:13:02 DEBUG (MainThread) [custom_components.afvalwijzer.sensor] Sensors = [<Entity trash_gft: Geen>, <Entity trash_plastic verpakkingsafval: Geen>, <Entity trash_restafval: Geen>, <Entity trash_papier: Geen>, <Entity trash_today: Geen>, <Entity trash_tomorrow: Geen>, <Entity trash_first_next_in_days: Geen>, <Entity trash_first_next_item: Geen>, <Entity trash_first_next_date: Geen>, <Entity trash_day_after_tomorrow: Geen>]

update

taking out the scan_interval: 1800 from my sensor config makes it respond immediately.

OMT: please have a look at this, it makes it clearer and easier to explain:

as you can see, the component creates 4 sensors, which I have displayed in the Glance Next pickups. Only thing is, the first one is todays pickup…

It would be wonderful if the Component would create these sensors, taking into account it should skip today. Just as it does now for the count_today option (which I have not set to use the default value false), in the understanding that’s what’s needed to have it skip today in the counting of the next days. Which works perfectly now indeed.

So, could you please have a look if this is alright?

update
@xirixiz did you have a chance to look at this please? What could I do to assist in realizing the component to skips todays pickup for the next pickup dates?

Just done everything as explained for install. But the sensor wont appear on my list in HA.

Steps taken > download the files, placed them in the given directory, restart HA, no erros reported from the sensor but is not showing up.

@Bert_Vos can you share some more information? Which path did you use, share your config. It seems like the component is not being loaded at all

Where can I find the bigger icons?
I have a pick up day which is combined both the GFT and Plastic. I got this working, but the icon on mijnafvalwijzer itself is very small.

I am looking for this one, but then the bigger variant:

As I had some time over I decided to create some icons in vector format. Not the best I ever created, but it should solve your need (and maybe the need of someone else)

SVG versions are available at:
https://sendeyo.com/en/5cf81973a0
https://sendeyo.com/en/9318c00c1e
https://sendeyo.com/en/c75813c69e
https://sendeyo.com/en/a059de30b1
https://sendeyo.com/en/128bf6b391

EDIT: re-created the plastic/can icon as I really disliked my previous version.

1 Like

nice, thanks!
Do you have a variant for the ‘rest afval’ too?

restafval restafval3

and maybe one for Plastics alone:
plastic
which is what Saver pickups in our wide neighbourhood.

they’re nice sharp and big :wink:

Since I am in a good mood :slight_smile:

woa, you’re fast!
thanks a bunch!

Is there also an icon for the combi of paper and gft?

Good job Frank!

Hi @xirixiz

did you eve get the chance to have a look at my request to have the next pickup dates not include todays pickup?

would be a major improvement if the 4 listed days could start with the first pickup date after todays pickup.

It’s already available, I thought you were using it for a while. For me it’s working properly.

count_today: vandaag meetellen # true or false

Here you go

im using this:

  - platform: afvalwijzer # Required
    provider: mijnafvalwijzer # Optional - mijnafvalwijzer (default) or afvalstoffendienstkalender
    zipcode: !secret postcode # Required
    housenumber: !secret huisnummer # Required
#    suffix: 'new' # Optional
#    count_today: false vandaag meetellen # Optional. true or false - Default = false
#    default_label: 'Geen' # Optional - Default is 'Geen'
    entity_namespace: saver
#    scan_interval: 1800

which is the default for count_today: false which makes the sensors

{{states('sensor.saver_trash_first_next_in_days')}}, {{states('sensor.saver_trash_first_next_date')|capitalize}} and
{{states('sensor.saver_trash_first_next_item')|capitalize}}

correct, as displayed in my screenshot above.

the listing below that is not correct though, because it also shows todays pickup.

this is what count_today: true does:

it changes the top sensors to include today, but doesn’t change the sensors listed below.

the glance card btw is this:

  - type: 'custom:auto-entities'
    card:
      type: glance
      title: Next pickups
#      title: "'! none'"
    filter:
      include:
        - attributes:
            next_pickup_in_days: '! none'
    sort:
      attribute: next_pickup_in_days
      method: attribute
      numeric: true

Great, thanks!

Are you still in a good mood :smiley: because I’m looking for a combi icon with rest garbage and plastic/can.

Here you go!

@xirixiz
there’s a typo in line 134 of the python library not sure if that was already picked up. Doesn’t seem to hurt anything though, I’ve never seen an error… :wink:

if you’re looking at it, semantics might be improved on that same first_next_in_days. Either trash_first_in_days, or maybe even better make it trash_next_in_days.
which would give the opportunity to also improve the naming of the other 2 sensors using first, into trash_next_date and trash_next_item.

thanks for considering.

Thank you very much, much appreciated !!