iCalendar with custom schedule for Home Assistant (garbage collection)
homeassistant calendar

Using the .ics file support in HA local calendar to solve the complex garbage collection schedule.
July 6, 2025

My town has a specific garbage collection schedule. We have 4 bins at home: general waste (black), paper (blue), plastic (yellow), and bio waste (brown). The first three get collected on Wednesdays, bio gets collected on Tuesdays. So far quite simple, right?

The first issue is that black, blue, and yellow are on a rotating schedule:

Wednesday 1: black
--> Wed 2: blue
--> Wed 3: black
--> Wed 4: yellow
--> Wed 5: black
...

Brown also has some complexity of its own.

Since it's impossible for a simple human like me to keep track of what bin to put out which week, I've been using Home Assistant to send me reminders. Unfortunately the Garbage Collection integration was discontinued, so I had to switch to the native HA calendar.


Setting up the first three was relatively simple:

This approach cannot be used for brown (bio), because the native calendar doesn't offer repeating schedule with exceptions ("every week, but only in these months"). Fortunately, it does support creating a new calendar from an iCalendar (.ics) file.

So I created two ICS files for the two different schedules: for summer and for winter. This is what the summer one looks like:

BEGIN:VCALENDAR
VERSION:2.0
BEGIN:VEVENT
UID:20250304-allday-bioodpad-leto@example.com
DTSTAMP:20250301T120000Z
SUMMARY:Bioodpad - léto
DTSTART;VALUE=DATE:20250304
DTEND;VALUE=DATE:20250305
RRULE:FREQ=WEEKLY;BYDAY=TU;BYMONTH=3,4,5,6,7,8,9,10,11
END:VEVENT
END:VCALENDAR

The key part is: RRULE:FREQ=WEEKLY;BYDAY=TU;BYMONTH=3,4,5,6,7,8,9,10,11 - it says: "every tuesday in the 3rd, 4th, 5th...11th month of the year".

So logically, the winter file looks like this:

BEGIN:VCALENDAR
VERSION:2.0
BEGIN:VEVENT
UID:20250304-allday-bioodpad@example.com
DTSTAMP:20250301T120000Z
SUMMARY:Bioodpad - zima
DTSTART;VALUE=DATE:20250304
DTEND;VALUE=DATE:20250305
RRULE:FREQ=WEEKLY;INTERVAL=2;BYDAY=TU;BYMONTH=1,2,12
END:VEVENT
END:VCALENDAR

To use it in Home Assistant:

Three calendars in Home Assistant

Found something inaccurate or plain wrong? Was this content helpful to you? Let me know!

📧 codez@deedx.cz