I’m trying to set up a smart speaker notification to alert me one day before garbage collection, specifying the type of waste being picked up. However, I’ve run into a challenge:
The garbage company in my municipality (Renodjurs, Denmark) collects waste on a variable schedule—every 4 weeks from October to March, and every 2 weeks from April to September.
The issue is that I don’t want to manually create a new calendar each year. I’m looking for a solution that can run indefinitely and automatically adjust to this schedule.
Does anyone have any ideas or know of a smart way to handle this?
You can do it with an automation by using a Repeat for Each action to create all the events, but you need to know the details so you can create a template that will get all the dates.
How do you determine when the different schedules start and end? For example, is the first collection in October 2 or 4 weeks after the last collection in September?
Which, if any, holidays can affect your collection date.
As you can see, after March it’s collected every 2 weeks, starting with the first collection. However, after September, it starts with the first collection and then switches to every 4 weeks.
i also checked your code and its a bit confusing for me XD
Why is it 5 weeks from the February collection to the March collection?
If there is a collection on March 4th is the next one on March 18th or April 1st?
I can’t fault you there… it is confusing.
The second example on the link is my actual garbage collection. Even through it’s pretty simple conceptually. It’s just one event every Wednesday; except for 5 possible holidays that can change it to Thursday. Turning that into a template that will work every year is complicated.
That being said, the tools available for templates has expanded since I made it, so there are likely some improvements that could be made.
If you don’t need to have the calendar fully populated in one go, it might be easier to use an automation that triggers based on the current event and creates the next event.