Garbage pickup date ( custom_component


Oké, the lay-out seems oké, but now i ran into the next issue. The data is only refreshing after restart. Do i need to trigger a refresh?


Hmm, that must be a bug… I have the same issue. I`ll verify what the problem is. Thanks!


Hi i’ve fixed the error. It was in the action field. I don’t know where. I replaced the action for my own notify and it works.
I think the errors are in the data_template:
message: >-
{% if (now().strftime("%Y-%m-%d")) == (as_timestamp(strptime(states.sensor.trash_gft.state, “%Y-%m-%d”)) - (1 * 86400 )) | timestamp_custom("%Y-%m-%d") %}.

After removed that it works…



I have a feature request. Is it possible to order the sensors for each garbage type by date ascending? I’m aware that sensors now are shown i the order the are defined in the group. So i guess it’s not so easy…

(btw, how do i add this feature request to github? In the issue section?)

thanks in advance,



Hi, is there any progress on this bug?


Hi Rudolf,

You could use this version (without Today and Tomorrow sensors):

That version is working as it should. Sorting isn’t possible within this component, since it depends on the group order, for example:

name: “Trash Pickup”
control: hidden
- sensor.trash_gft
- sensor.trash_restafval
- sensor.trash_papier
- sensor.trash_pmd

Date formatting

So i created this custom components… looks great… but my date stamps are in english format. How can I change it to duch format ?


Placed the .py file in the right location and edited my platform sensors.

But i am still getting the following error:

Log Details (ERROR)
Thu Jul 05 2018 16:08:33 GMT+0200 (Central European Summer Time)

Error while setting up platform mijnafvalwijzer
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/”, line 129, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File “/usr/lib/python3.5/asyncio/”, line 400, in wait_for
return fut.result()
File “/usr/lib/python3.5/asyncio/”, line 293, in result
raise self._exception
File “/usr/lib/python3.5/asyncio/”, line 239, in _step
result = coro.send(None)
File “/usr/lib/python3.5/asyncio/”, line 210, in coro
res = func(*args, **kw)
File “/home/homeassistant/.homeassistant/custom_components/sensor/”, line 45, in async_setup_platform
json_obj = response.json()
File “/srv/homeassistant/lib/python3.5/site-packages/requests/”, line 892, in json
return complexjson.loads(self.text, **kwargs)
File “/usr/lib/python3.5/json/”, line 319, in loads
return _default_decoder.decode(s)
File “/usr/lib/python3.5/json/”, line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File “/usr/lib/python3.5/json/”, line 357, in raw_decode
raise JSONDecodeError(“Expecting value”, s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)


  • platform: mijnafvalwijzer
    postcode: !secret afvalwijzer_postcode
    huisnummer: !secret afvalwijzer_huisnummer


Have a look at Bin / Waste Collection


seems this CC does the trick just fine and your link shows many quests yet to be solved… :wink:


Because I thought it might help…:thinking:


lol, sure, should have been a bit more elaborate in my question why… sorry.
What would be the added value of that way of handling waste management scripting for this Custom Component? Given the fact this is another website and data altogether.Unfortunately I must admit.


Well I think in many ways, maybe not specific to this exact component

But here goes:

-For others, who come here and can’t use it for their location.
-For people who can use it, but might get an idea from what’s been achieved in the other thread, eg the use of cURL, scraping and interacting with the waste site they are parsing
-Also there have been some innovative suggestions for the use of a waste component in the thread, eg the use of coloured LEDs to show the bin that needs to go out, automations etc.
-For people who want to take this component, edit it and adapt.
-A stretch but, potentially help the original developer branch out this to a universal component for more regions.
-The other thread links back to this one so people can see this thread also. I think this helps keep the topics connected from a category perspective.

… I could go on.

I started with this component but could not get it to work for my location. If at the time I had seen a link that was to another thread showing how I might be able to do it then that would have greatly helped.


Edit line 121

Change it to
dateConvert = d.strftime("%d-%m-%Y")


Great news, I just released a new version! Finally scan interval (update) is working again!
The next release will contain today and tomorrow sensors with the type of trash to be picked up. Should be released this month.


nice!, though the previous version is working just fine, I will most certainly check to see the difference and progress you’ve made.

Have you ever given the ‘overmorgen’ (day after tomorrow) any thoughts?
In our location trash is always picked up on tuesdays and thursdays, and in the Saver app, vandaag and overmorgen are displayed by default (if on a tuesday).
Maybe its possible to have that in the sensor too? It is calculated (scraped) correctly:



Here you go, added trash_today and trash_tomorrow sensors:


Feature request. Config locally or on gcalendar the waste days … The Dutch site does not cover the world :wink:


I think I will modify your component to point at my server and serve a handmade Json.
Actually this could be a minimal mod. A switch to point either at the site or at a local json


A switch point is a good idea indeed! …I tried to parse local json, but I couldn’t get it working with the file sensor (