Waste Collection Schedule Framework

Thanks buddy… I actually thought that I’ve already tried this version… but I just had to change it to the calendar version.

1 Like

hi, I wanted to add my local disposal company to HA: https://www.entsorgungsbetrieb-mol.de/de/tourenplan-2023.html
I found out that they use Abfall.IO / AbfallPlus de, but I can’t find out the required values for f_id_kommune & f_id_strasse. Also in the abfall_io.py script the company is not findable.
About trying to add the company, I got a python script error:

Edit-Try in Service Map:

   {   
        "title": "Entsorgung MOL",
        "url": "https://www.entsorgungsbetrieb-mol.de/",
        "service_id": "efb75cbd1f08fae1d4e47ae72a85c655",
    },

values i found via html code and did try (not my actual address)

waste_collection_schedule:
    sources:
    - name: abfall_io
      args:
        key: efb75cbd1f08fae1d4e47ae72a85c655
        f_id_kommune: 6349 #Fredersdorf
        f_id_strasse: 844 #Am Rathaus
        f_abfallarten:
            - 18
            - 2139
            - 20
            - 295
            - 42
            - 1480

can anyone help?

thanks in advance,
thomas

@s1zE https://github.com/mampfes/hacs_waste_collection_schedule/blob/530f20f3462f0d2ee174b76225f74c1a0930c16d/doc/ics/entsorgungsbetrieb_mol_de.md

not what i expected but thanks :slight_smile:
i will continue to use the csv source

Hi.

Any idea why stoke gov uk stopped working suddenly ? I get following error

This error originated from a custom integration.

Logger: waste_collection_schedule.source_shell
Source: custom_components/waste_collection_schedule/waste_collection_schedule/source_shell.py:136
Integration: waste_collection_schedule (documentation)
First occurred: 01:54:04 (1 occurrences)
Last logged: 01:54:04

fetch failed for source Stoke-on-Trent: 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/stoke_gov_uk.py", line 49, in fetch date = datetime.strptime(date_time, DATE_FORMAT).date() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/_strptime.py", line 568, in _strptime_datetime tt, fraction, gmtoff_fraction = _strptime(data_string, format) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/_strptime.py", line 349, in _strptime raise ValueError("time data %r does not match format %r" % ValueError: time data '13/10/2023' does not match format '%d/%m/%Y %H:%M:%S'

Thank you very much for sharing!

Can you please share your Dashboard code as well.

Would be a dream :slight_smile:

Hi, I am trying to figure out the best way to integrate calendars that are in Synology Calendar. These calendars are available over the local network through CalDAV.

Is there a way to use CalDAV as a source?

So far, as a workaround, I am exporting the calendars to ICS files and linking them locally, but any updates to the calendars have to be handled manually.

Edit:
Nevermind. I found the error, it was on my side - adding “” to my house number did the trick. Now the integration is working like a charm!


Hey there,

first of all thank you very much for creating this framework!

I have tried to add the integration to my HA config, however, after adding the corresponding lines to the configuration.yaml, I get the following error message in my log:

> Logger: waste_collection_schedule.source_shell
> Source: custom_components/waste_collection_schedule/waste_collection_schedule/source_shell.py:136
> Integration: waste_collection_schedule ([documentation](https://github.com/mampfes/hacs_waste_collection_schedule#readme))
> First occurred: 19:18:32 (1 occurrences)
> Last logged: 19:18:32
> 
> 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 109, in fetch for d in self._app.generate_calendar(): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/waste_collection_schedule/waste_collection_schedule/service/AppAbfallplusDe.py", line 683, in generate_calendar self.select_hnr() File "/config/custom_components/waste_collection_schedule/waste_collection_schedule/service/AppAbfallplusDe.py", line 554, in select_hnr if compare(hnr["name"], self._hnr_search, remove_space=True): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/waste_collection_schedule/waste_collection_schedule/service/AppAbfallplusDe.py", line 286, in compare b = b.replace(" ", "") ^^^^^^^^^ AttributeError: 'int' object has no attribute 'replace'

The sensor shows up just fine, but cannot display any data (this being due to the error in fetching the data from the service provider, I guess).

As I am still quite new to using custom integrations, I am not sure how to troubleshoot this error. Could you help me in solving the error?

Thank you very much in advance!

Hi all,
thanks for this great integration. Unfortunately, I still have problems to get it to work. I think getting the sources is my main problem. I went on the website of my waste company (Abfuhrtermine | Abfallwirtschaft Böblingen) and they are using abfall.io. So I made the settings (city and district - selecting street or house number is not possible) and tried to catch the request via the development tools in the browser. But all it shows is this:
image

So the key, the house number and the waste types are available with this catch, but nothing else. Something like “Form Data” as described (https://github.com/mampfes/hacs_waste_collection_schedule/blob/dee89ecc858eafafab69be81dfbaf46210c301bc/doc/source/abfall_io.md) is not visible.

Anyone has an idea what I need to do, to get the right sources?

Thanks & best regards
Kejo

Obviously they changed their API to a newer version.
You can try the ICS source instead. Just copy the link behind the ICS export button and use this as url for the ICS source.

I recently set up this integration, and am trying to troubleshoot an issue I’m having. I thought everything was working correctly, however I noticed that my calendar is only showing this week’s “Solid Waste” pickup. It’s correctly showing “Recycle” pickup every other week, but the “Solid Waste” should be showing up every week. Below is what I have in my configuration.yaml file (I edited out my actual address), and I would appreciate any assistance in troubleshooting. I did check the Republic Services website, and it shows my collection schedule correctly (trash pickup every week).

waste_collection_schedule:
  sources:
    - name: republicservices_com
      args:
        street_address: "XXXX XXXXXXX XX, XXXXXX, XX, XXXXX"
sensor:
  - platform: waste_collection_schedule
    name: "Waste Collection Schedule"

Here you go:

type: glance
entities:
  - sensor.awm_restmull_2
  - sensor.awm_papiermull
  - sensor.awm_biomull

If someone is interested in a combination of upcoming schedule and garbage type, you can use this:

  value_template: >-
    {% set type = (value.types | join(", ")) %}
    {% if value.daysTo == 0 %}
      Heute {{ type }}
    {% elif value.daysTo == 1 %}
      Morgen {{ type }}
    {% else %}
      {{ type }} in {{value.daysTo}} Tagen
    {% endif %}

Output will look like this:

Heute Restmüll oder Morgen Biotonne or Gelbe Tonne in drei Tagen

1 Like

This is the automation we’re using to notify our phones of the bin day, including the colour of the bins.

alias: Bin day notification
description: ""
trigger:
  - platform: calendar
    event: start
    offset: "-5:0:0"
    entity_id: calendar.south_oxfordshire_district_council
condition: []
action:
  - service: notify.mobile_app_bobsiphone
    data_template:
      message: >-
        It's {{ state_attr('sensor.waste', (now() +
        timedelta(days=1)).strftime('%Y-%m-%d')) }}.
      title: Bin day tomorrow!
  - service: notify.mobile_app_janesiphone
    data_template:
      message: >-
        It's {{ state_attr('sensor.waste', (now() +
        timedelta(days=1)).strftime('%Y-%m-%d')) }}.
      title: Bin day tomorrow!
mode: single

For my town the WCS plugin pulls the daily tour schedule of the entire town. The entries are formatted with a tour prefix like “Trash 2 / Organic Waste 2 / Plastic 1: Trash” etc.

What’s the best way of filtering out the entries in the calendar that don’t have the prefix “Trash 2 / Organic Waste 2 / Plastic 1: …” ? Thank you!

Within your configuration.yaml where you have WCS plugin configured with the source you can filter out by using show under customize

waste_collection_schedule:
  sources:
    - name: little_town
      args:
        uprn: "XXXXX"
      customize:
        - type: "Trash 2"
          show: false
        - type: "Organic Waste 2"
          show: false
        - type: "Plastic 1"
          show: false

Anyone got a solution to changing the icon colour based on bin collection? Eg. Blue with recycling, black for waste, green for garden? I’m using a template mushroom card, can’t seem to figure it out.

Did you ever get the recyclecoach source working? My community uses it also and I’ve been unable to retrieve data from them by supplying the address as shown in the example.

fyi, have edited: {value.daysTo} has to be {{value.daysTo}}

I have it working perfectly, wanted to add a picture instead of the icon but now won’t load the integration.
Any assistance would be much appreciated.