We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[Bug]: "Ortsteil" missing for AbfallPlus in Weißenburg/Gunzenhausen
### I Have A Problem With:

A specific source

### What's Your Problem

For my part of the village (aka "Ortsteil") it is not choosable. 
You can check it here: https://www.landkreis-wug.de/abfall/abfuhrkalender/ , I have to select
Stadt/Gemeinde:Haundorf
Straße/Ortsteil: Obererlbach
Straße: Alle Straßen

I tried the app_abfallplus_de.py script, but I can't select my "Ortsteil", just the Maincommunity/-city "Haundorf".
waste_collection_schedule:
    sources:
    - name: app_abfallplus_de
      args:
        app_id: de.k4systems.abfallappwug
        city: Haundorf
        strasse: alle Straßen

### Source (if relevant)

app_abfallplus_de

### Logs

_No response_

### Relevant Configuration

_No response_

### Checklist Source Error

- [X] Use the example parameters for your source (often available in the documentation) (don't forget to restart Home Assistant after changing the configuration)
- [X] Checked that the website of your service provider is still working
- [X] Tested my attributes on the service provider website (if possible)
- [X] I have tested with the latest version of the integration (master) (for HACS in the 3 dot menu of the integration click on "Redownload" and choose master as version)

### Checklist Sensor Error

- [X] Checked in the Home Assistant Calendar tab if the event names match the types names (if types argument is used)

### Required

- [X] I have searched past (closed AND opened) issues to see if this bug has already been reported, and it hasn't been.
- [X] I understand that people give their precious time for free, and thus I've done my very best to make this problem as easy as possible to investigate.

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `custom_components/waste_collection_schedule/waste_collection_schedule/wizard/app_abfallplus_de.py`
Content:
```
1 #!/usr/bin/env python3
2 import site
3 from pathlib import Path
4 from typing import Tuple
5 
6 import inquirer
7 
8 package_dir = Path(__file__).resolve().parents[2]
9 site.addsitedir(str(package_dir))
10 import waste_collection_schedule.service.AppAbfallplusDe as AppAbfallplusDe  # noqa: E402
11 
12 YAML = {
13     "base": """
14 waste_collection_schedule:
15     sources:
16     - name: app_abfallplus_de
17       args:
18         app_id: {app_id}
19         city: {city}""",
20     "bezirk": """
21         bezirk: {bezirk}""",
22     "street": """
23         strasse: {strasse}""",
24     "hnr": """
25         hnr: {hnr}""",
26     "bundesland": """
27         bundesland: {bundesland}""",
28     "landkreis": """
29         landkreis: {landkreis}""",
30 }
31 
32 
33 def select_bundesland(app: AppAbfallplusDe.AppAbfallplusDe):
34     bundeslaender = app.get_bundeslaender()
35     questions = [
36         inquirer.List(
37             "bundesland",
38             choices=sorted([(s["name"], s["name"]) for s in bundeslaender]),
39             message="Select your Bundesland",
40         )
41     ]
42     bundesland = inquirer.prompt(questions)["bundesland"]
43     app.select_bundesland(bundesland)
44     return bundesland
45 
46 
47 def select_landkreis(app: AppAbfallplusDe.AppAbfallplusDe):
48     landkreise = app.get_landkreise()
49     questions = [
50         inquirer.List(
51             "landkreis",
52             choices=sorted(
53                 [(s["name"], s["name"]) for s in landkreise] + [("BACK", "BACK")]
54             ),
55             message="Select your Landkreis",
56         )
57     ]
58     landkreis = inquirer.prompt(questions)["landkreis"]
59     if landkreis == "BACK":
60         app.clear(0)
61         select_bundesland(app)
62         return select_landkreis(app)
63     app.select_landkreis(landkreis)
64     return landkreis
65 
66 
67 def select_city(app: AppAbfallplusDe.AppAbfallplusDe, bund_select: bool):
68     cities = app.get_kommunen()
69     questions = [
70         inquirer.List(
71             "city",
72             choices=sorted([(s["name"], s["name"]) for s in cities])
73             + ([("BACK", "BACK")] if bund_select else []),
74             message="Select your Kommune",
75         )
76     ]
77     city = inquirer.prompt(questions)["city"]
78     if city == "BACK":
79         app.clear(1)
80         select_landkreis(app)
81         return select_city(app, bund_select)
82 
83     app.select_kommune(city)
84     return city
85 
86 
87 def select_bezirk(
88     app: AppAbfallplusDe.AppAbfallplusDe, bund_select: bool
89 ) -> Tuple[str, bool]:
90     bezirke = app.get_bezirke()
91     questions = [
92         inquirer.List(
93             "bezirk",
94             choices=sorted([(s["name"], s["name"]) for s in bezirke])
95             + [("BACK", "BACK")],
96             message="Select your Bezirk",
97         )
98     ]
99     bezirk = inquirer.prompt(questions)["bezirk"]
100     if bezirk == "BACK":
101         app.clear(2)
102         select_city(app, bund_select)
103         return select_bezirk(app, bund_select)
104 
105     return bezirk, app.select_bezirk(bezirk)
106 
107 
108 def select_street(app: AppAbfallplusDe.AppAbfallplusDe, bund_select: bool):
109     street = None
110     street_search = ""
111     while street is None:
112         questions = [
113             inquirer.Text(
114                 "street_search",
115                 message="Search your street you will be given some options to choose from",
116                 default=street_search,
117             )
118         ]
119         streets = app.get_streets(inquirer.prompt(questions)["street_search"])
120         questions = [
121             inquirer.List(
122                 "street",
123                 choices=sorted([(s["name"], s["name"]) for s in streets])
124                 + [("BACK", "BACK")],
125                 message="Select your Street",
126             )
127         ]
128         street = inquirer.prompt(questions)["street"]
129         if street == "BACK":
130             street = None
131 
132     if street == "BACK":
133         app.clear(2)
134         select_city(app, bund_select)
135         return select_street(app, bund_select)
136 
137     app.select_street(street)
138     return street
139 
140 
141 def select_house_number(app: AppAbfallplusDe.AppAbfallplusDe, bund_select: bool):
142     house_numbers = app.get_hnrs()
143     questions = [
144         inquirer.List(
145             "house_number",
146             choices=[(s["name"], s["name"]) for s in house_numbers]
147             + [("BACK", "BACK")],
148             message="Select your House Number",
149         )
150     ]
151     house_number = inquirer.prompt(questions)["house_number"]
152     if house_number == "BACK":
153         app.clear(3)
154         select_street(app, bund_select)
155         return select_house_number(app, bund_select)
156     app.select_hnr(house_number)
157     return house_number
158 
159 
160 def main():
161     questions = [
162         inquirer.List(
163             "app-id",
164             choices=[(s, s) for s in sorted(AppAbfallplusDe.SUPPORTED_APPS)],
165             message="Select your App",
166         )
167     ]
168     app_id = inquirer.prompt(questions)["app-id"]
169 
170     app = AppAbfallplusDe.AppAbfallplusDe(app_id, "", "", "")
171     bezirk_needed = "bezirk" in app.init_connection() and app.get_bezirke() != []
172     cities = app.get_kommunen()
173     bund_select = cities == []
174 
175     bundesland = landkreis = None
176     if bund_select:
177         bundesland = select_bundesland(app)
178         landkreis = select_landkreis(app)
179         # cities = app.get_kommunen()
180 
181     city = select_city(app, bund_select)
182     finished = False
183     house_number = ""
184     street = None
185     if bezirk_needed:
186         bezirk, finished = select_bezirk(app, bund_select)
187     if not finished:
188         street = select_street(app, bund_select)
189         if app.get_hrn_needed():
190             house_number = select_house_number(app, bund_select)
191 
192     yaml = YAML["base"].format(
193         app_id=app_id,
194         city=city,
195     )
196     if bezirk_needed:
197         yaml += YAML["bezirk"].format(bezirk=bezirk)
198     if street:
199         yaml += YAML["street"].format(strasse=street)
200     if house_number:
201         yaml += YAML["hnr"].format(hnr=house_number)
202     if bundesland:
203         yaml += YAML["bundesland"].format(bundesland=bundesland)
204     if landkreis:
205         yaml += YAML["landkreis"].format(landkreis=landkreis)
206 
207     print(yaml)
208 
209 
210 if __name__ == "__main__":
211     main()
212
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/custom_components/waste_collection_schedule/waste_collection_schedule/wizard/app_abfallplus_de.py b/custom_components/waste_collection_schedule/waste_collection_schedule/wizard/app_abfallplus_de.py
--- a/custom_components/waste_collection_schedule/waste_collection_schedule/wizard/app_abfallplus_de.py
+++ b/custom_components/waste_collection_schedule/waste_collection_schedule/wizard/app_abfallplus_de.py
@@ -168,7 +168,7 @@
     app_id = inquirer.prompt(questions)["app-id"]
 
     app = AppAbfallplusDe.AppAbfallplusDe(app_id, "", "", "")
-    bezirk_needed = "bezirk" in app.init_connection() and app.get_bezirke() != []
+    bezirk_needed = "bezirk" in app.init_connection()
     cities = app.get_kommunen()
     bund_select = cities == []
 
@@ -182,6 +182,7 @@
     finished = False
     house_number = ""
     street = None
+    bezirk_needed = bezirk_needed and app.get_bezirke() != []
     if bezirk_needed:
         bezirk, finished = select_bezirk(app, bund_select)
     if not finished:

{"golden_diff": "diff --git a/custom_components/waste_collection_schedule/waste_collection_schedule/wizard/app_abfallplus_de.py b/custom_components/waste_collection_schedule/waste_collection_schedule/wizard/app_abfallplus_de.py\n--- a/custom_components/waste_collection_schedule/waste_collection_schedule/wizard/app_abfallplus_de.py\n+++ b/custom_components/waste_collection_schedule/waste_collection_schedule/wizard/app_abfallplus_de.py\n@@ -168,7 +168,7 @@\n     app_id = inquirer.prompt(questions)[\"app-id\"]\n \n     app = AppAbfallplusDe.AppAbfallplusDe(app_id, \"\", \"\", \"\")\n-    bezirk_needed = \"bezirk\" in app.init_connection() and app.get_bezirke() != []\n+    bezirk_needed = \"bezirk\" in app.init_connection()\n     cities = app.get_kommunen()\n     bund_select = cities == []\n \n@@ -182,6 +182,7 @@\n     finished = False\n     house_number = \"\"\n     street = None\n+    bezirk_needed = bezirk_needed and app.get_bezirke() != []\n     if bezirk_needed:\n         bezirk, finished = select_bezirk(app, bund_select)\n     if not finished:\n", "issue": "[Bug]: \"Ortsteil\" missing for AbfallPlus in Wei\u00dfenburg/Gunzenhausen\n### I Have A Problem With:\n\nA specific source\n\n### What's Your Problem\n\nFor my part of the village (aka \"Ortsteil\") it is not choosable. \r\nYou can check it here: https://www.landkreis-wug.de/abfall/abfuhrkalender/ , I have to select\r\nStadt/Gemeinde:Haundorf\r\nStra\u00dfe/Ortsteil: Obererlbach\r\nStra\u00dfe: Alle Stra\u00dfen\r\n\r\nI tried the app_abfallplus_de.py script, but I can't select my \"Ortsteil\", just the Maincommunity/-city \"Haundorf\".\r\nwaste_collection_schedule:\r\n    sources:\r\n    - name: app_abfallplus_de\r\n      args:\r\n        app_id: de.k4systems.abfallappwug\r\n        city: Haundorf\r\n        strasse: alle Stra\u00dfen\n\n### Source (if relevant)\n\napp_abfallplus_de\n\n### Logs\n\n_No response_\n\n### Relevant Configuration\n\n_No response_\n\n### Checklist Source Error\n\n- [X] Use the example parameters for your source (often available in the documentation) (don't forget to restart Home Assistant after changing the configuration)\n- [X] Checked that the website of your service provider is still working\n- [X] Tested my attributes on the service provider website (if possible)\n- [X] I have tested with the latest version of the integration (master) (for HACS in the 3 dot menu of the integration click on \"Redownload\" and choose master as version)\n\n### Checklist Sensor Error\n\n- [X] Checked in the Home Assistant Calendar tab if the event names match the types names (if types argument is used)\n\n### Required\n\n- [X] I have searched past (closed AND opened) issues to see if this bug has already been reported, and it hasn't been.\n- [X] I understand that people give their precious time for free, and thus I've done my very best to make this problem as easy as possible to investigate.\n", "before_files": [{"content": "#!/usr/bin/env python3\nimport site\nfrom pathlib import Path\nfrom typing import Tuple\n\nimport inquirer\n\npackage_dir = Path(__file__).resolve().parents[2]\nsite.addsitedir(str(package_dir))\nimport waste_collection_schedule.service.AppAbfallplusDe as AppAbfallplusDe  # noqa: E402\n\nYAML = {\n    \"base\": \"\"\"\nwaste_collection_schedule:\n    sources:\n    - name: app_abfallplus_de\n      args:\n        app_id: {app_id}\n        city: {city}\"\"\",\n    \"bezirk\": \"\"\"\n        bezirk: {bezirk}\"\"\",\n    \"street\": \"\"\"\n        strasse: {strasse}\"\"\",\n    \"hnr\": \"\"\"\n        hnr: {hnr}\"\"\",\n    \"bundesland\": \"\"\"\n        bundesland: {bundesland}\"\"\",\n    \"landkreis\": \"\"\"\n        landkreis: {landkreis}\"\"\",\n}\n\n\ndef select_bundesland(app: AppAbfallplusDe.AppAbfallplusDe):\n    bundeslaender = app.get_bundeslaender()\n    questions = [\n        inquirer.List(\n            \"bundesland\",\n            choices=sorted([(s[\"name\"], s[\"name\"]) for s in bundeslaender]),\n            message=\"Select your Bundesland\",\n        )\n    ]\n    bundesland = inquirer.prompt(questions)[\"bundesland\"]\n    app.select_bundesland(bundesland)\n    return bundesland\n\n\ndef select_landkreis(app: AppAbfallplusDe.AppAbfallplusDe):\n    landkreise = app.get_landkreise()\n    questions = [\n        inquirer.List(\n            \"landkreis\",\n            choices=sorted(\n                [(s[\"name\"], s[\"name\"]) for s in landkreise] + [(\"BACK\", \"BACK\")]\n            ),\n            message=\"Select your Landkreis\",\n        )\n    ]\n    landkreis = inquirer.prompt(questions)[\"landkreis\"]\n    if landkreis == \"BACK\":\n        app.clear(0)\n        select_bundesland(app)\n        return select_landkreis(app)\n    app.select_landkreis(landkreis)\n    return landkreis\n\n\ndef select_city(app: AppAbfallplusDe.AppAbfallplusDe, bund_select: bool):\n    cities = app.get_kommunen()\n    questions = [\n        inquirer.List(\n            \"city\",\n            choices=sorted([(s[\"name\"], s[\"name\"]) for s in cities])\n            + ([(\"BACK\", \"BACK\")] if bund_select else []),\n            message=\"Select your Kommune\",\n        )\n    ]\n    city = inquirer.prompt(questions)[\"city\"]\n    if city == \"BACK\":\n        app.clear(1)\n        select_landkreis(app)\n        return select_city(app, bund_select)\n\n    app.select_kommune(city)\n    return city\n\n\ndef select_bezirk(\n    app: AppAbfallplusDe.AppAbfallplusDe, bund_select: bool\n) -> Tuple[str, bool]:\n    bezirke = app.get_bezirke()\n    questions = [\n        inquirer.List(\n            \"bezirk\",\n            choices=sorted([(s[\"name\"], s[\"name\"]) for s in bezirke])\n            + [(\"BACK\", \"BACK\")],\n            message=\"Select your Bezirk\",\n        )\n    ]\n    bezirk = inquirer.prompt(questions)[\"bezirk\"]\n    if bezirk == \"BACK\":\n        app.clear(2)\n        select_city(app, bund_select)\n        return select_bezirk(app, bund_select)\n\n    return bezirk, app.select_bezirk(bezirk)\n\n\ndef select_street(app: AppAbfallplusDe.AppAbfallplusDe, bund_select: bool):\n    street = None\n    street_search = \"\"\n    while street is None:\n        questions = [\n            inquirer.Text(\n                \"street_search\",\n                message=\"Search your street you will be given some options to choose from\",\n                default=street_search,\n            )\n        ]\n        streets = app.get_streets(inquirer.prompt(questions)[\"street_search\"])\n        questions = [\n            inquirer.List(\n                \"street\",\n                choices=sorted([(s[\"name\"], s[\"name\"]) for s in streets])\n                + [(\"BACK\", \"BACK\")],\n                message=\"Select your Street\",\n            )\n        ]\n        street = inquirer.prompt(questions)[\"street\"]\n        if street == \"BACK\":\n            street = None\n\n    if street == \"BACK\":\n        app.clear(2)\n        select_city(app, bund_select)\n        return select_street(app, bund_select)\n\n    app.select_street(street)\n    return street\n\n\ndef select_house_number(app: AppAbfallplusDe.AppAbfallplusDe, bund_select: bool):\n    house_numbers = app.get_hnrs()\n    questions = [\n        inquirer.List(\n            \"house_number\",\n            choices=[(s[\"name\"], s[\"name\"]) for s in house_numbers]\n            + [(\"BACK\", \"BACK\")],\n            message=\"Select your House Number\",\n        )\n    ]\n    house_number = inquirer.prompt(questions)[\"house_number\"]\n    if house_number == \"BACK\":\n        app.clear(3)\n        select_street(app, bund_select)\n        return select_house_number(app, bund_select)\n    app.select_hnr(house_number)\n    return house_number\n\n\ndef main():\n    questions = [\n        inquirer.List(\n            \"app-id\",\n            choices=[(s, s) for s in sorted(AppAbfallplusDe.SUPPORTED_APPS)],\n            message=\"Select your App\",\n        )\n    ]\n    app_id = inquirer.prompt(questions)[\"app-id\"]\n\n    app = AppAbfallplusDe.AppAbfallplusDe(app_id, \"\", \"\", \"\")\n    bezirk_needed = \"bezirk\" in app.init_connection() and app.get_bezirke() != []\n    cities = app.get_kommunen()\n    bund_select = cities == []\n\n    bundesland = landkreis = None\n    if bund_select:\n        bundesland = select_bundesland(app)\n        landkreis = select_landkreis(app)\n        # cities = app.get_kommunen()\n\n    city = select_city(app, bund_select)\n    finished = False\n    house_number = \"\"\n    street = None\n    if bezirk_needed:\n        bezirk, finished = select_bezirk(app, bund_select)\n    if not finished:\n        street = select_street(app, bund_select)\n        if app.get_hrn_needed():\n            house_number = select_house_number(app, bund_select)\n\n    yaml = YAML[\"base\"].format(\n        app_id=app_id,\n        city=city,\n    )\n    if bezirk_needed:\n        yaml += YAML[\"bezirk\"].format(bezirk=bezirk)\n    if street:\n        yaml += YAML[\"street\"].format(strasse=street)\n    if house_number:\n        yaml += YAML[\"hnr\"].format(hnr=house_number)\n    if bundesland:\n        yaml += YAML[\"bundesland\"].format(bundesland=bundesland)\n    if landkreis:\n        yaml += YAML[\"landkreis\"].format(landkreis=landkreis)\n\n    print(yaml)\n\n\nif __name__ == \"__main__\":\n    main()\n", "path": "custom_components/waste_collection_schedule/waste_collection_schedule/wizard/app_abfallplus_de.py"}], "after_files": [{"content": "#!/usr/bin/env python3\nimport site\nfrom pathlib import Path\nfrom typing import Tuple\n\nimport inquirer\n\npackage_dir = Path(__file__).resolve().parents[2]\nsite.addsitedir(str(package_dir))\nimport waste_collection_schedule.service.AppAbfallplusDe as AppAbfallplusDe  # noqa: E402\n\nYAML = {\n    \"base\": \"\"\"\nwaste_collection_schedule:\n    sources:\n    - name: app_abfallplus_de\n      args:\n        app_id: {app_id}\n        city: {city}\"\"\",\n    \"bezirk\": \"\"\"\n        bezirk: {bezirk}\"\"\",\n    \"street\": \"\"\"\n        strasse: {strasse}\"\"\",\n    \"hnr\": \"\"\"\n        hnr: {hnr}\"\"\",\n    \"bundesland\": \"\"\"\n        bundesland: {bundesland}\"\"\",\n    \"landkreis\": \"\"\"\n        landkreis: {landkreis}\"\"\",\n}\n\n\ndef select_bundesland(app: AppAbfallplusDe.AppAbfallplusDe):\n    bundeslaender = app.get_bundeslaender()\n    questions = [\n        inquirer.List(\n            \"bundesland\",\n            choices=sorted([(s[\"name\"], s[\"name\"]) for s in bundeslaender]),\n            message=\"Select your Bundesland\",\n        )\n    ]\n    bundesland = inquirer.prompt(questions)[\"bundesland\"]\n    app.select_bundesland(bundesland)\n    return bundesland\n\n\ndef select_landkreis(app: AppAbfallplusDe.AppAbfallplusDe):\n    landkreise = app.get_landkreise()\n    questions = [\n        inquirer.List(\n            \"landkreis\",\n            choices=sorted(\n                [(s[\"name\"], s[\"name\"]) for s in landkreise] + [(\"BACK\", \"BACK\")]\n            ),\n            message=\"Select your Landkreis\",\n        )\n    ]\n    landkreis = inquirer.prompt(questions)[\"landkreis\"]\n    if landkreis == \"BACK\":\n        app.clear(0)\n        select_bundesland(app)\n        return select_landkreis(app)\n    app.select_landkreis(landkreis)\n    return landkreis\n\n\ndef select_city(app: AppAbfallplusDe.AppAbfallplusDe, bund_select: bool):\n    cities = app.get_kommunen()\n    questions = [\n        inquirer.List(\n            \"city\",\n            choices=sorted([(s[\"name\"], s[\"name\"]) for s in cities])\n            + ([(\"BACK\", \"BACK\")] if bund_select else []),\n            message=\"Select your Kommune\",\n        )\n    ]\n    city = inquirer.prompt(questions)[\"city\"]\n    if city == \"BACK\":\n        app.clear(1)\n        select_landkreis(app)\n        return select_city(app, bund_select)\n\n    app.select_kommune(city)\n    return city\n\n\ndef select_bezirk(\n    app: AppAbfallplusDe.AppAbfallplusDe, bund_select: bool\n) -> Tuple[str, bool]:\n    bezirke = app.get_bezirke()\n    questions = [\n        inquirer.List(\n            \"bezirk\",\n            choices=sorted([(s[\"name\"], s[\"name\"]) for s in bezirke])\n            + [(\"BACK\", \"BACK\")],\n            message=\"Select your Bezirk\",\n        )\n    ]\n    bezirk = inquirer.prompt(questions)[\"bezirk\"]\n    if bezirk == \"BACK\":\n        app.clear(2)\n        select_city(app, bund_select)\n        return select_bezirk(app, bund_select)\n\n    return bezirk, app.select_bezirk(bezirk)\n\n\ndef select_street(app: AppAbfallplusDe.AppAbfallplusDe, bund_select: bool):\n    street = None\n    street_search = \"\"\n    while street is None:\n        questions = [\n            inquirer.Text(\n                \"street_search\",\n                message=\"Search your street you will be given some options to choose from\",\n                default=street_search,\n            )\n        ]\n        streets = app.get_streets(inquirer.prompt(questions)[\"street_search\"])\n        questions = [\n            inquirer.List(\n                \"street\",\n                choices=sorted([(s[\"name\"], s[\"name\"]) for s in streets])\n                + [(\"BACK\", \"BACK\")],\n                message=\"Select your Street\",\n            )\n        ]\n        street = inquirer.prompt(questions)[\"street\"]\n        if street == \"BACK\":\n            street = None\n\n    if street == \"BACK\":\n        app.clear(2)\n        select_city(app, bund_select)\n        return select_street(app, bund_select)\n\n    app.select_street(street)\n    return street\n\n\ndef select_house_number(app: AppAbfallplusDe.AppAbfallplusDe, bund_select: bool):\n    house_numbers = app.get_hnrs()\n    questions = [\n        inquirer.List(\n            \"house_number\",\n            choices=[(s[\"name\"], s[\"name\"]) for s in house_numbers]\n            + [(\"BACK\", \"BACK\")],\n            message=\"Select your House Number\",\n        )\n    ]\n    house_number = inquirer.prompt(questions)[\"house_number\"]\n    if house_number == \"BACK\":\n        app.clear(3)\n        select_street(app, bund_select)\n        return select_house_number(app, bund_select)\n    app.select_hnr(house_number)\n    return house_number\n\n\ndef main():\n    questions = [\n        inquirer.List(\n            \"app-id\",\n            choices=[(s, s) for s in sorted(AppAbfallplusDe.SUPPORTED_APPS)],\n            message=\"Select your App\",\n        )\n    ]\n    app_id = inquirer.prompt(questions)[\"app-id\"]\n\n    app = AppAbfallplusDe.AppAbfallplusDe(app_id, \"\", \"\", \"\")\n    bezirk_needed = \"bezirk\" in app.init_connection()\n    cities = app.get_kommunen()\n    bund_select = cities == []\n\n    bundesland = landkreis = None\n    if bund_select:\n        bundesland = select_bundesland(app)\n        landkreis = select_landkreis(app)\n        # cities = app.get_kommunen()\n\n    city = select_city(app, bund_select)\n    finished = False\n    house_number = \"\"\n    street = None\n    bezirk_needed = bezirk_needed and app.get_bezirke() != []\n    if bezirk_needed:\n        bezirk, finished = select_bezirk(app, bund_select)\n    if not finished:\n        street = select_street(app, bund_select)\n        if app.get_hrn_needed():\n            house_number = select_house_number(app, bund_select)\n\n    yaml = YAML[\"base\"].format(\n        app_id=app_id,\n        city=city,\n    )\n    if bezirk_needed:\n        yaml += YAML[\"bezirk\"].format(bezirk=bezirk)\n    if street:\n        yaml += YAML[\"street\"].format(strasse=street)\n    if house_number:\n        yaml += YAML[\"hnr\"].format(hnr=house_number)\n    if bundesland:\n        yaml += YAML[\"bundesland\"].format(bundesland=bundesland)\n    if landkreis:\n        yaml += YAML[\"landkreis\"].format(landkreis=landkreis)\n\n    print(yaml)\n\n\nif __name__ == \"__main__\":\n    main()\n", "path": "custom_components/waste_collection_schedule/waste_collection_schedule/wizard/app_abfallplus_de.py"}]}