Waste Collection Schedule Framework

Hello,
can someone help with this error?

Dieser Fehler wurde von einer benutzerdefinierten Integration verursacht

Logger: waste_collection_schedule.source_shell
Quelle: custom_components/waste_collection_schedule/waste_collection_schedule/source_shell.py:136
Integration: waste_collection_schedule (Dokumentation)
Erstmals aufgetreten: 12:28:15 (1 Vorkommnisse)
Zuletzt protokolliert: 12:28:15

fetch failed for source Zweckverband Abfallwirtschaft Region Hannover: Traceback (most recent call last): File "/config/custom_components/waste_collection_schedule/waste_collection_schedule/source_shell.py", line 134, in fetch entries = self._source.fetch() ^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/waste_collection_schedule/waste_collection_schedule/source/aha_region_de.py", line 117, in fetch dates = self._ics.convert(r.text) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/waste_collection_schedule/waste_collection_schedule/service/ICS.py", line 48, in convert events: List[Any] = icalevents.events( ^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/icalevents/icalevents.py", line 57, in events found_events += parse_events( ^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/icalevents/icalparser.py", line 286, in parse_events raise ValueError("Content is invalid!") ValueError: Content is invalid!

Failed for me aswell. Actually I tried different addresses, the only address working is the one from the example, even a different street in the same town isn’t working for me :frowning:
working:

    - name: aha_region_de
      args:
        gemeinde: Neustadt a. Rbge.
        strasse: Am Rotdorn / Nöpke
        hnr: "1"
        zusatz: ""

not working:

    - name: aha_region_de
      args:
        gemeinde: Neustadt a. Rbge.
        strasse: Eichenweg / Neustadt
        hnr: "1"
        zusatz: ""

also not working:

    - name: aha_region_de
      args:
        gemeinde: Uetze
        strasse: Dachtmisser Weg / Obershagen
        hnr: "1"
        zusatz: ""

Maybe some change at AHA?

in your sensor template in configuration.yaml
you would need something like this

value_template: '{{value.types|join(", ")}} {% if value.daysTo == 0 %}Today{% elif value.daysTo == 1 %}Tomorrow{% else %}in {{value.daysTo}} days{% endif %} '
    

You must change over hacs to master release and reboot HAS.
Then it work again

type: entity-filter
entities:
  - sensor.nachste_abholung
state_filter:
  - operator: regex
    value: Morgen
  - operator: regex
    value: Heute
card:
  type: entities

this is working :slight_smile:

other question:
is it possible that I can use the “name” instead of the “types” to show it for “next collection”?
image

you can add an alias in the config


waste_collection_schedule:
    sources:
    - name: cherwell_gov_uk
      args:
        uprn: "" 
      customize:
      - type: Green Bin
        picture: https://forms.cherwell.gov.uk/images/bin-collections/bin-collection-green.svg
        alias: "Rubbish (Green)"
      - type: Blue Bin
        picture: https://forms.cherwell.gov.uk/images/bin-collections/bin-collection-blue.svg
        alias: "Recycling (Blue)"
      - type: Brown Bin
        picture: https://forms.cherwell.gov.uk/images/bin-collections/bin-collection-brown.svg
        alias: "Garden (Brown)"     

if you add an alias you would need to change the sensor with the alias instead unless your using “all waste types”


  - platform: waste_collection_schedule
    name: Household
    details_format: upcoming
    value_template: '{% if value.daysTo == 0 %}Today{% elif value.daysTo == 1 %}Tomorrow{% else %}in {{value.daysTo}} days{% endif %} '
    date_template: '{{value.date.strftime("%d.%m.%Y")}}'
    add_days_to: True
    types:
      - "Rubbish (Green)"
1 Like

I have tried to install this over the python wizard. For stadtreinigung hamburg it didnt work. after it asks for a Street it stops. Any ideas?

Howdy all. If anyone could lend a hand with “multiple wrapper” for sources
 I’ve been trying to set it up with partial success.
The sources code:

waste_collection_schedule:
  sources:
    - name: multiple
      args:
        static:
          - type: mijesani_otpad
            frequency: WEEKLY
            weekdays: WE
            start: '2024-04-01'
            until: '2030-01-01'
          - type: plastika_i_metal
            frequency: WEEKLY
            interval: 2
            weekdays: MO
            start: '2024-04-01'
            until: '2030-01-01'
          - type: papir
            frequency: WEEKLY
            interval: 2
            weekdays: MO
            start: '2024-04-08'
            until: '2030-01-01'
          - type: biootpad
            frequency: WEEKLY
            weekdays: SU
            start: '2024-04-14'
            until: '2030-01-01'
  day_switch_time: '18:30'

works, but I have no idea how to peform “customize” (add icons, change names) or where to put “calendar_title:” and need a little help with that. Wherever I tried to put any of the mentioned “options” in, i get something like:

TypeError: Source.__init__() got an unexpected keyword argument 'calendar_title'

Thanks in advance.

try to put “customize” at the same distance as “name” in your config.yaml

my yaml looks like:

waste_collection_schedule:
    sources:
    - name: xxx
      args:
        city: xxx
        street: xxx
      customize:
      - type: Gelbe/r Sack/Tonne
        #picture: https://forms.cherwell.gov.uk/images/bin-collections/bin-collection-green.svg
        alias: "Gelber Sack"
      - type: RestmĂŒll 4-wöchentlich
        alias: "RestmĂŒll (4)"

Thanks alot for the suggestion! Unfortunately, neither

waste_collection_schedule:
  sources:
    - name: multiple
      args:
        static:
          - type: mijesani_otpad
            frequency: WEEKLY
            weekdays: WE
            start: '2024-04-01'
            until: '2025-01-01'
          - type: plastika_i_metal
            frequency: WEEKLY
            interval: 2
            weekdays: MO
            start: '2024-04-01'
            until: '2025-01-01'
          - type: papir
            frequency: WEEKLY
            interval: 2
            weekdays: MO
            start: '2024-04-08'
            until: '2025-01-01'
          - type: biootpad
            frequency: WEEKLY
            weekdays: SU
            start: '2024-04-14'
            until: '2025-01-01'
      customize:
      - type: mijesani_otpad
        alias: 'MijeĆĄani Otpad"
  day_switch_time: '23:30'

or

waste_collection_schedule:
  sources:
    - name: multiple
      args:
        static:
          - type: mijesani_otpad
            frequency: WEEKLY
            weekdays: WE
            start: '2024-04-01'
            until: '2025-01-01'
          - type: plastika_i_metal
            frequency: WEEKLY
            interval: 2
            weekdays: MO
            start: '2024-04-01'
            until: '2025-01-01'
          - type: papir
            frequency: WEEKLY
            interval: 2
            weekdays: MO
            start: '2024-04-08'
            until: '2025-01-01'
          - type: biootpad
            frequency: WEEKLY
            weekdays: SU
            start: '2024-04-14'
            until: '2025-01-01'
      customize:
        - type: mijesani_otpad
          alias: 'MijeĆĄani Otpad"
  day_switch_time: '23:30'

works. In both cases checking the config in HA results in:

Error loading /config/configuration.yaml: while parsing a block mapping
  in "/config/configuration.yaml", line 93, column 9
expected <block end>, but found '<scalar>'
  in "/config/configuration.yaml", line 95, column 21

, of course with diferent numbers for lines / columns. I’ve tried quite a few combinations, but haven’t managed to figure it out yet.

The waste planner works very well - and the support team is very quick to help with any problems: THANK YOU VERY MUCH

Does anyone have a solution for sorting the output of the emptying dates according to the remaining days?

So instead of current:

A in 6 days

B in 4 days

C in 4 days

D in 12 days

better:

B in 4 days

C in 4 days

A in 6 days

D in 12 days

Thanks in advance

I just want to thank the developers who took the time to make this service. Much appreciated!!

1 Like

Hi guys

I love this integration and had it working fine for Auckland, New Zealand but all of a sudden the calendar now has no entries.

Is there something I can do to check what’s going wrong here?

Cheers

Hi all

Is anyone able to help create a source from

An example address would be 28 Nott St, Balwyn 3103.

Thanks!

Dear all,

thank you, a lot, really love this integration!
Used it for a while now, but since 4-5 days my sensors are “unknown”.

This is the log:

Dieser Fehler wurde von einer benutzerdefinierten Integration verursacht

Logger: waste_collection_schedule.source_shell
Quelle: custom_components/waste_collection_schedule/waste_collection_schedule/source_shell.py:136
Integration: waste_collection_schedule (Dokumentation)
Erstmals aufgetreten: 08:15:29 (1 Vorkommnisse)
Zuletzt protokolliert: 08:15:29

fetch failed for source Apps by Abfall+: Traceback (most recent call last): File "/config/custom_components/waste_collection_schedule/waste_collection_schedule/source_shell.py", line 134, in fetch entries = self._source.fetch() ^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/waste_collection_schedule/waste_collection_schedule/source/app_abfallplus_de.py", line 140, in fetch for d in self._app.generate_calendar(): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/waste_collection_schedule/waste_collection_schedule/service/AppAbfallplusDe.py", line 786, in generate_calendar self.select_kommune() File "/config/custom_components/waste_collection_schedule/waste_collection_schedule/service/AppAbfallplusDe.py", line 502, in select_kommune raise Exception(f"Region {self._region_search} not found.") Exception: Region Au not found.

Any ideas?

Using the App on my smartphone provided by the waste collector, the region “Au” is still correct.

Thank you in advance and all the best
Benedikt

Hi Hammsta, can you publish your config? I’m trying to get it working for Auckland as well

I just got recyclecoach to work. Try googling recyclecoach + your city’s/town’s name and the state you’re in. If your municipality has a page on its website dedicated to recyclecoach, a link to it will appear in the results. (My results showed municipal pages for my own town’s page as well as the pages of other cities and towns in my state.) When you go to your munipality’s page, it should resemble this:

Enter your address in the search bar and a calendar will appear with your waste schedule. Click on the Export Calendar button that appears below the calendar and choose to export it in Google Calendar format. Click Yes to confirm export, and log in to your google account if prompted to do so. The next thing that will appear is a small window over your google calendar that looks like this:
Screen Shot 2024-04-24 at 22.13.10

Copy the link in that window and paste it to a text file. It will look something like this.

http://calendar.recyclecoach.com/calendar/export/575/JER/zone-z9789-z9793.ics

The link provides you with your project_id, district_id, and zone_id. In the above example, the project_id is 575, the district_id is JER, and the zone_id is zone-z9789-z9793. (Note that these ids can vary in format; for example, the one above for jersey city provides a number for the project_id, while the project_id for my municipality contains letters and symbols.)

Now add those three items under the street, city, and state args in the sources section of the waste_collection_schedule entry in your configuration.yaml. do not remove those three existing args (even though they’re not working) because WCS will return an error if those args aren’t there. So using the above example, the new sources section will list:

      - name: recyclecoach_com
        args:
          street: [# and street name]
          city: jersey city
          state: new jersey
          project_id: 575
          district_id: JER
          zone_id: zone-z9789-z9793
1 Like

@yapishkahilt Great post with instructions. I apologize I hadn’t done a post like this months ago when I figured out that the _ids are all required. Recyclecoach doesn’t work (at least in my area) by looking up a street address.

Just discovered this integration and was very excited to see that it covers EcoHarmonogram.pl, that is used by my city. Installed it just yesterday and after some fiddling with parameters got it working, e.g. calendar.ecohaemonogram was created and properly populated with entries for garbage collection.
But today morning I updated HA to 2025.5.1 (was on 2025.5) and calendar is gone
 I mean entity remains created, but state is unavailable. I tried HA restart, but with no success. Integration now does not show any longer on the list of Devices and Services in HA. No errors in log file. What might be wrong?

i had the same problem with 2025.5.1 also had issues with frigate and my energy consumption integration also no issues in the log. for now I’ve just reverted back to 2025.5.0 and everything is back to normal
will skip this patch for now and try and problem solve with the next patch.