olibos/HomeAssistant-RecycleApp

Multiple cities with different schedules for same postalcode

Closed this issue · 6 comments

For postalcode 9310 their are multiple cities with different waist pick-up schedules. As default Baardegem is selected. But I would need a way to select Meldert

Hello @GHBenjaminS , thank you for your feedback.

Can you give me the street name, I'll check and see what can be made

Eeckhoutstraat
For now I was able to solve it by hardcoding the correct zip code id into config_flow.py.

Hello @GHBenjaminS ,
If I check the request for zip code 9310, I receive the following response:

{
    "items": [
        {
            "city": {
                "names": {
                    "nl": "Aalst",
                    "fr": "Alost",
                    "de": "Aalst",
                    "en": "Aalst"
                },
                "zipcodes": [
                    "9300-41002",
                    "9308-41002",
                    "9310-41002",
                    "9320-41002"
                ],
                "createdAt": "2020-07-13T22:00:01.034Z",
                "name": "Aalst",
                "updatedAt": "2020-09-21T22:17:20.480Z",
                "id": "41002"
            },
            "code": "9310",
            "createdAt": "2020-07-13T22:00:01.034Z",
            "names": [
                {
                    "nl": "Baardegem",
                    "fr": "Baardegem",
                    "de": "Baardegem",
                    "en": "Baardegem"
                },
                {
                    "nl": "Herdersem",
                    "fr": "Herdersem",
                    "de": "Herdersem",
                    "en": "Herdersem"
                },
                {
                    "nl": "Meldert",
                    "fr": "Meldert",
                    "de": "Meldert",
                    "en": "Meldert"
                },
                {
                    "nl": "Moorsel",
                    "fr": "Moorsel",
                    "de": "Moorsel",
                    "en": "Moorsel"
                }
            ],
            "updatedAt": "2020-09-21T22:17:20.479Z",
            "id": "9310-41002",
            "available": true
        }
    ],
    "total": 1,
    "pages": 1,
    "page": 1,
    "size": 20,
    "self": "https://awe-in-wa-recycle-datatank.azurewebsites.net/v1/zipcodes?q=9310&page=1&size=20",
    "first": "https://awe-in-wa-recycle-datatank.azurewebsites.net/v1/zipcodes?q=9310&page=1&size=20",
    "last": "https://awe-in-wa-recycle-datatank.azurewebsites.net/v1/zipcodes?q=9310&page=1&size=20"
}

For me both Baardegem and Meldert resolve to the same id: 9310-41002
and if I look on both calendars I don't see any differences in waist pick-up schedules:
9310 Baardegem:
image

9310 Meldert:
image

Can you share the update you've made? And what was the problem you had? Is it only "cosmetic" city name or did you see collect differences?

Thank you

Hello @GHBenjaminS , any news?

You are right. They do have the same schedule. Not sure what difference I thought I had seen.
So beside the "cosmetic" city name their is no issue after all.
Thanks for looking into it!

Thank you for the confirmation, I'll leave it as is as we can rename the entity with the correct city name in the UI.