Waste Collection Schedule Framework

source_index is missing.

Hi, i do not know exactly where i have to search, maybe you can give me a hintā€¦
Since the 14.08. three of my dates turned to unknownā€¦
Where should i start to search?

configuration.yaml

waste_collection_schedule:
  sources:
    - name: regioentsorgung_de
      args:
        city: Baesweiler
        street: Pastor-Engelhard-StraƟe
        house_number: 7
      #    - name: ics
      #      args:
      #        file: "www/Leerungstermine521772.ics"
      customize:
        - type: Bioabfall 2-Rad-Behaelter 02-woechentl.
          alias: bioabfall
          icon: mdi:trash-can
        - type: Gruenschnitt-Strassensammlung
          alias: gruenschnitt
          icon: mdi:trash-can
        - type: Gelbe Saecke
          alias: gelbesaecke
          icon: mdi:trash-can
        - type: Papierabfuhr 2-Rad-Behaelter 04-woechentl.
          alias: papier
          icon: mdi:trash-can
        - type: Restabfall 2-Rad-Behaelter 02-woechentl.
          alias: restmuell
          icon: mdi:trash-can
  fetch_time: "04:20"
  day_switch_time: "10:00"

Ok,
i found the problem,
my provider changed the name for the trash-categorysā€¦

changed the configuration.yaml, restart, working againā€¦

You might want to hide your address in the codeā€¦ :slight_smile: Btw. nice area ā€œim Drei-LƤnder-Eckā€! :rofl:

Hi, I am trying to get the Framework running with Abfallnavi. I tried to run the Python script shown in the documentation, but it does not show the dialogue as it should - so I cannot get the service IDs.
The shell only responds by showing errors
Python3 Version 3.10.12
Pip3 Version 22.0.2
inquirer installed
Would you have an idea what went wrong?

File "/xx/abfallnavi_de.py", line 1, in <module>
[...]
NameError: name 'false' is not defined. Did you mean: 'False'?

Thank you very much for this nice framework. I have installed it manually via copying the waste-
collection-scheduler-folders to the /config/custom_components/waste_collection_schedule folder of my HASSIO instance.

I added the waste_collection_scheduler-section to my configuration.yaml. config-check is ok. After restarting HASSIO, all sensors connected to waste_collection_scheduler have the value ā€œunavailableā€.

When checking the protocol, I can see the error ā€œwaste_collection_scheduler always returning source not foundā€:

I tried three configs, but I am getting the same error for all three:

##############################
waste_collection_schedule:
  sources:
    - name: Abfallkalender
      args:
        service_id: mymuell
        city_id: 59942
        area_id: 59942
##############################
waste_collection_schedule:
  sources:
    - name: Abfallkalender
      args:
        url: https://calendar.google.com/calendar/ical/df9e29879c8d37ecff55d875af17618678d25a6c8c31ac30c75df7a529270d24%40group.calendar.google.com/public/basic.ics 
      customize:
        - type: Biotonne
          alias: Biotonne
          icon: mdi:trash-can
        - type: Gelbe Tonne
          alias: GelbeTonne
          icon: mdi:recycle
        - type: Papiertonne
          alias: Papiertonne
          icon: mdi:trash-can
  fetch_time: "04:00"
  day_switch_time: "10:00"                        
##############################
waste_collection_schedule:
  sources:
    - name: Abfallkalender
      args:
        file: "www/Abfallkalender/Abfallkalender_Haag_2023.ics"
               
      customize:
        - type: Biotonne
          alias: Biotonne
          icon: mdi:trash-can
        - type: Gelbe Tonne
          alias: GelbeTonne
          icon: mdi:recycle
        - type: Papiertonne
          alias: Papiertonne
          icon: mdi:trash-can
  fetch_time: "04:00"
  day_switch_time: "10:00"  
##############################

What am I doing wrong? I have no ideas anymore. Please advise.

@StefanDee You have to install it in the config/custom_components directory! not www.

Hi Steffen,

Thanks for your answer.

This was my fault in my first post, sorry. It is installed in /config/custom_components/waste_collection_schedule folder. The calender is in the www-folder.

grafik

Cheers,
Stefan

Any other ideas? I am cluelessā€¦

@StefanDee You have to keep the source name, this is used to identify the source. You renamed it to ā€œAbfallkalenderā€.

@mampfes : Totally correct! This solved the problem! Working fine now. Thank you so much.

Hi,
I have a small problem after updating to the latest version.
I changed the source because I thought it might be the problem, but it ainā€™t.

configuration.yaml

waste_collection_schedule:
  sources:
    - name: awb_emsland_de
      args:
        city: Meppen
        street: my street
        house_number: 1
      customize:
        - type: Wertstoffbehaelter
          alias: gelbe
          icon: mdi:recycle
        - type: Papierbehaelter
          alias: paper
          icon: mdi:trash-can-outline
        - type: Bioabfallbehaelter
          alias: bio
          icon: mdi:flower-outline
        - type: Restabfallbehaelter
          alias: trash
          icon: mdi:trash-can
  fetch_time: "04:00"
  day_switch_time: "10:00"

sensor.yaml


- platform: waste_collection_schedule
  name: WasteRecycle
  details_format: "upcoming"
  value_template: "{% if value.daysTo == 0 %}Today{% elif value.daysTo == 1 %}Tomorrow{% else %}in {{value.daysTo}} days{% endif %}"
  types:
    - gelbe

- platform: waste_collection_schedule
  name: WastePaper
  details_format: "upcoming"
  value_template: "{% if value.daysTo == 0 %}Today{% elif value.daysTo == 1 %}Tomorrow{% else %}in {{value.daysTo}} days{% endif %}"
  types:
    - paper

- platform: waste_collection_schedule
  name: WasteTrash
  details_format: "upcoming"
  value_template: "{% if value.daysTo == 0 %}Today{% elif value.daysTo == 1 %}Tomorrow{% else %}in {{value.daysTo}} days{% endif %}"
  types:
    - trash

- platform: waste_collection_schedule
  name: WasteBio
  details_format: "upcoming"
  value_template: "{% if value.daysTo == 0 %}Today{% elif value.daysTo == 1 %}Tomorrow{% else %}in {{value.daysTo}} days{% endif %}"
  types:
    - bio

- platform: waste_collection_schedule
  name: WasteNext
  details_format: "upcoming"
  value_template: "{% if value.daysTo == 0 %}Today{% elif value.daysTo == 1 %}Tomorrow{% else %}in {{value.daysTo}} days{% endif %}"

the error:

Integration error: waste_collection_schedule - Integration 'waste_collection_schedule' not found.
Platform error sensor.waste_collection_schedule - Integration 'waste_collection_schedule' not found.
Platform error sensor.waste_collection_schedule - Integration 'waste_collection_schedule' not found.
Platform error sensor.waste_collection_schedule - Integration 'waste_collection_schedule' not found.
Platform error sensor.waste_collection_schedule - Integration 'waste_collection_schedule' not found.
Platform error sensor.waste_collection_schedule - Integration 'waste_collection_schedule' not found.

I donā€™t have a clue what changed, any help would be very much appreciated.

Solved, the update went sideways, reinstalled and fixed

Apologies for reviving this old post. Where did you find Albaā€™s ICS? All I can see is a PDF calendar or the option to install a mobile app.

A lot of time has passed since then but the custom integration works perfectly to this day. These are my notes from back then. Please access the link and follow my descriptions I maked at the time:
ā€œWebsite [(Abfuhrtermine)] aufrufen und Adresse eingeben und mit Rechtsklick ā€œUntersuchenā€
dann Rechtsklick und Element untersuchen um Abfall.io Felder zu finden (Achtung! drei Punkte Felder aufklappen)ā€
Die benƶtigten Daten entnehmen und in die Konfiguration Ć¼bernehmen.

My configuration.yaml
waste_collection_schedule:
sources:
- name: abfall_io
args:
key: 9583a2fa1df97ā€¦
f_id_kommune: 32ā€¦
f_id_bezirk: 0
f_id_strasse: XXXXStrasse.
f_id_strasse_hnr: 308ā€¦
customize:
- type: Wertstofftonne
alias: wertstoffe
icon: mdi:recycle

1 Like

By the way, this is the better way, because the ICS are always limited in time and would then have to be replaced at the turn of the year.

Greetings
Andreas

I have been using this integration with a static setting and notice that recycle coach was added. This seems a better way of doing it as sometimes ( do to holidays) the dates change.

I do not understand how to get the 4 pickup with the recycle coach.

My current setup:

waste_collection_schedule:
  sources:
    - name: static
      calendar_title: Garbage-Pickup
      args:
        type: Garbage
        frequency: WEEKLY
        weekdays: {MO, TH}
    - name: static
      calendar_title: Yard-Pickup
      args:
        type: Yard
        frequency: WEEKLY
        weekdays: MO
    - name: static
      calendar_title: Recycle-Pickup
      args:
        type: Recycle
        frequency: WEEKLY
        weekdays: WE
    - name: static
      calendar_title: Branches-Pickup
      args:
        type: Branches
        frequency: WEEKLY
        weekdays: TU
    - name: recyclecoach_com 
      args:
        street: xxx ave
        city: xxxxbeach
        state: 
sensor:
# next garbage collection
  - platform: waste_collection_schedule
    name: garbage_col
    source_index: 0
    details_format: generic
    add_days_to: true
    value_template: "{{ value.daysTo }}"
    types:
      - Garbage
# next yard waste collection
  - platform: waste_collection_schedule
    name: yard_waste_col
    source_index: 1
    details_format: generic
    add_days_to: true
    value_template: "{{ value.daysTo }}"
    types:
      - Yard
# next recycle_collection
  - platform: waste_collection_schedule
    name: recycle_col
    source_index: 2
    details_format: generic
    add_days_to: true
    value_template: "{{ value.daysTo }}"
    types:
      - Recycle

# next branches collection
  - platform: waste_collection_schedule
    name: branches_col
    source_index: 3
    details_format: generic
    add_days_to: true
    value_template: "{{ value.daysTo }}"
    types:
      - Branches

I have not seen any examples in the docs showing four pickups for the recycle coach.

Thanks.

So ā€œf_id_strasseā€ and ā€œf_id_strasse_hnrā€ is just name name and number in plaintext? I also couldnā€™t finde ā€œf_id_bezirkā€ in the source code.

Can I just ask, does the lack of a tameside_gov_uk python script suggest that the info is no longer being provided by my local authority?

Hi, im a little bit stuck in a thingy hereā€¦
the EBE changeg 1 day but didint update the ics, so i tried to change the day manually, but it didnt work.
can s.o. pls look into it?

sensor:    
  - platform: waste_collection_schedule
    name: RestmĆ¼ll
    details_format: "upcoming"
    value_template: '{% if value.daysTo == 0 %}Heute{% elif value.daysTo == 1 %}Morgen{% else %}in {{value.daysTo}} Tagen{% endif %}'
    types:
      - Graue Tonne

  - platform: waste_collection_schedule
    name: Papier
    details_format: "upcoming"
    value_template: '{% if value.daysTo == 0 %}Heute{% elif value.daysTo == 1 %}Morgen{% else %}in {{value.daysTo}} Tagen{% endif %}'
    types:
      - Blaue Tonne

  - platform: waste_collection_schedule
    name: Wertstoff
    details_format: "upcoming"
    value_template: '{% if value.daysTo == 0 %}Heute{% elif value.daysTo == 1 %}Morgen{% else %}in {{value.daysTo}} Tagen{% endif %}'
    types:
      - Gelbe Tonne
      
  - platform: waste_collection_schedule
    name: Braune Tonne
    details_format: "upcoming"
    value_template: '{% if value.daysTo == 0 %}Heute{% elif value.daysTo == 1 %}Morgen{% else %}in {{value.daysTo - 1}} Tagen{% endif %}'
    types:
      - Braune Tonne

  - platform: waste_collection_schedule
    name: RestmĆ¼llDatum
    details_format: "upcoming"
    value_template: 'am: {{value.date.strftime("%d.%m.%Y")}}'
    types:
      - Graue Tonne

  - platform: waste_collection_schedule
    name: WertstoffDatum
    details_format: "upcoming"
    value_template: 'am: {{value.date.strftime("%d.%m.%Y")}}'
    types:
      - Gelbe Tonne
      
  - platform: waste_collection_schedule
    name: Braune Tonne Datum
    details_format: "upcoming"
    value_template: 'am: {{ (value.date - timedelta(days=1)).strftime("%d.%m.%Y") }}'
    types:
      - Braune Tonne
      
  - platform: waste_collection_schedule
    name: Blaue Tonne Datum
    details_format: "upcoming"
    value_template: 'am: {{value.date.strftime("%d.%m.%Y")}}'
    types:
      - Blaue Tonne

Bio Abfall should be showing today and not tomorrow???

@nicstreet No, the reason for this is that is not part of an official release yet. You can either switch to the master branch or copy the file manually.
Releases are scheduled every 6-8 weeks.