mampfes / hacs_waste_collection_schedule

Home Assistant integration framework for (garbage collection) schedules
MIT License
988 stars 631 forks source link

[Bug]: Apps_AbfallIO, Cant Create for "Nordsachsen" (Schkeuditz - District) #2580

Closed MickLesk closed 2 weeks ago

MickLesk commented 2 weeks ago

I Have A Problem With:

A specific source

What's Your Problem

1.) I go to the following page: https://www.asg-nordsachsen.de/entsorgung/abfalltermine.html 2.) Select city/municipality (%auswahl_kommune_set) “Schkeuditz” 3.) Select “City/District” (%auswahl_bezirk_set) “Radefeld” 4.) Street automatically set to “all streets” | House number automatically set to “all house numbers”.

The API queries come from: “api.abfall.io”

My current solution has always been to download the ics calendar and integrate it into Home Assistant. Unfortunately, I have often failed to set up the “Waste Collection Schedule”, but never had time to create an issue.

Here is my current config:

ics_calendar:
  calendars:
    - name: “Waste Collection Schedule”
      url: “http://localhost:8123/local/abfall.ics”
      include_all_day: True

No matter what I have tried, e.g. “Bezirk” -> “Schkeuditz” then I get the following error: “The source returned an invalid response: ‘Bezirk Schkeuditz not found.’. Please check the arguments and try again.”

If I still enter the district “Radefeld” I get the following message: “The source has returned an invalid response: “Region Radefeld not found.”. Please check the arguments and try again.”

To be honest, I no longer know what I have to enter to make it work. :-D

image

Source (if relevant)

de.abfallwecker

Logs

No response

Relevant Configuration

No response

Checklist Source Error

Checklist Sensor Error

Required

5ila5 commented 2 weeks ago

Configuring this is really not ideal, and we probably need to create a wizard and integrate them into the GUI, looks like you need to specify bundesland and landkreis for abfallwecker

Did some testing and this configuration works:

    "app_id": "de.abfallwecker",
    "city": "Schkeuditz",
    "bezirk": "Radefeld",
    "bundesland": "Sachsen",
    "landkreis": "Landkreis Nordsachsen",
5ila5 commented 2 weeks ago

Alternatively, you can use the abfall_io source with

# Output of wizard/abfall_io.py with ASG Nordsachsen -> Schkeuditz -> Radefeld -> alle Straßen -> Alle Hausnummern
# waste_collection_schedule source configuration
waste_collection_schedule:
  sources:
    - name: abfall_io
      args:
        key: 1d78841c5d7fc43ebe52b9dc01f6b962
        f_id_kommune: 4398
        f_id_bezirk: 360309
        f_id_strasse: 487
        f_id_strasse_hnr: 360401

As i added it to the python script in #2583

MickLesk commented 2 weeks ago

Configuring this is really not ideal, and we probably need to create a wizard and integrate them into the GUI, looks like you need to specify bundesland and landkreis for abfallwecker

Did some testing and this configuration works:

    "app_id": "de.abfallwecker",
    "city": "Schkeuditz",
    "bezirk": "Radefeld",
    "bundesland": "Sachsen",
    "landkreis": "Landkreis Nordsachsen",

That's it! At first I tried it in a similar way but with “Nordsachsen” instead of “Landkreis Nordsachsen”, but it worked now perfectly. So I can finally replace the ics :-) Thank you very much!

Should I close the issue, or is this still being optimized?

5ila5 commented 2 weeks ago

I can close this, the custom wizards are on my radar