Hi everyone, just wanted to share how my setup looks. I just went down the route of scraping a Google Calendar I made myself and used code already provided here. If anyone wants the images I use for the wheelie bins, let me know and I’ll attach them.
Long thread so i might have missed it. How do you add you city to the site? It says contact your ‘City Hall’ but that is a rather simple reply. It is not like i can walk into the office and say ‘please add to’ and they will go “sure, we get it”. (send a mail to my city anyway, i doubt it will have an effect though)
I think you need some luck it’s added.
As far as I know you can use the following two sites:
afvalwijzer.nl
afvalstoffendienstkalender.nl
I use the second one and can’t find my postalcode on the first. So perhaps you could try both. Next to that see if your ‘gemeente’ supplies some info, that how I found out this component was working for afvalstoffendienstkalender.nl as well.
Tried to email them. It is online for me for Leiden but its always ‘even’ and ‘uneven’ weeks. I mean i can remember easilly by looking at the street on the day itself but it would be nice to automate
Leiden doesn’t seem to use mijnafvalwijzer.nl or afvalstoffendienstkalender.nl. It’s a pity there are so much differences between gemeenten for trash pickup schedules. I cannot just create a simple component to serve them all unfortunately.
Appreciate the effort, ofcourse you should not make everything. City’s should just use the same methods. Like i said, i mailed them… you never know. Not that i ever missed my garbage, but that doesn’t stop me from automating it.
Hi efleming,
just saw your post and was wondering if you are willing so share your setup/config to help me out. I also want to use a google calendar because there is nothing available from my city. I did link the google calendar to HA and got the calendar items set up. I now see in my casew three entities names “calendar.garbagetype” in my setup, however I dont really understand how to go from here. I know I need sensors. I want to be able to show the next pick up date like you have and I want to be able to have an automation to get an alexa and ios notificataion the day before.
Your help would be greaatly appreciated.
Okay, so for each calendar you have (you’ve probably alread done this, but just in case) create your ‘appointments’ for the garbage that is being collected, (mine are recycling, general and green). The script below scrapes for the name but it doesn’t have to be exact from my trials.
This is the code I used in my configuration.yaml for one of the bins - just change the details to reflect the name of the calendar you’re looking to for each sensor:
Thank you so much, I’ll see where I get with that tonight. So just to clarify that code queries all the calendara items for the word recycling. So you have not set up the calendar items for the three garbage typs and use those?
This is my code for the caldendar:
- cal_id: 6********@group.calendar.google.com
entities:
- device_id: Waste Bin
ignore_availability: true
name: Waste Bin
track: true
search: Waste Bin
- device_id: Paper
ignore_availability: true
name: Paper
track: true
search: Paper
- device_id: Recycling
ignore_availability: true
name: Recycling
track: true
search: Recycling
So in my recycling calendar, I have a recycling appointment. And then for the green waste calendar, green waste appointment, etc cetera. I think you’ve got all the appointments in the one calendar? That could work too, but I went this way.
Have been playing around wqith it and got it to work, except the dates are always one day short and on the day of the pick up the value of the sensor is “unknown”.
Somehow its substracting one day too many I think?
UPDATE 30min after this post: I restarted HA after I eliminated the ü in the friendly name. Now I get a value again but now ALL three garbage values are 1 day short again. The paper one is now showing 11 instead of 12 like it did 30min ago.
Original Post:
yes they are. Strange thing: Today, one day later the value for two sensors is now correct. So I put the script/code into the template editor to test it and the result is not the same as shown as sensor value. Attached you find 3 pics. One shows my calendar (dont mind that its in german ) and you see a paper pick up on the 16th, thats 12 days from today. The second pic shows the sensor as displayed in the frontend and now it also shows 12 days. and the third pic shows the result I get when I put it in the template editor and there it says 11 days.
The “Restmüll” sensor still says unknown now and next pick up would be in 27 days. Maybe the ü is the problem in the freindly name? And is the other thing with the days maybe a time zone problem?