prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  [Bug]: abfallwirtschaft_pforzheim_de has change the URL.
  ### I Have A Problem With:
  
  A specific source
  
  ### What's Your Problem
  
  The URL changes from "https://www.abfallwirtschaft-pforzheim.de/kundenportal/abfallkalender" to "https://www.abfallwirtschaft-pforzheim.de/abfallkalender". On the new Site you need to select a checkbox for the year. I think this option would disappear on the beginning of the next year. But the addon doesnt show me the calendar for 2023 anymore. Its complete empty.
  
  ### Source (if relevant)
  
  abfallwirtschaft_pforzheim_de
  
  ### Logs
  
  ```Shell
  no relevant logs
  ```
  
  
  ### Relevant Configuration
  
  ```YAML
  abfallwirtschaft_pforzheim_de
  ```
  
  
  ### Checklist Source Error
  
  - [ ] Use the example parameters for your source (often available in the documentation) (don't forget to restart Home Assistant after changing the configuration)
  - [ ] Checked that the website of your service provider is still working
  - [ ] 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
  
  - [ ] 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/source/abfallwirtschaft_pforzheim_de.py`
  Content:
  ```
  1 from html.parser import HTMLParser
  2 
  3 import requests
  4 from waste_collection_schedule import Collection  # type: ignore[attr-defined]
  5 from waste_collection_schedule.service.ICS import ICS
  6 
  7 # Source code based on rh_entsorgung_de.md
  8 TITLE = "Abfallwirtschaft Pforzheim"
  9 DESCRIPTION = "Source for Abfallwirtschaft Pforzheim."
  10 URL = "https://www.abfallwirtschaft-pforzheim.de"
  11 TEST_CASES = {
  12     "Abnobstraße": {
  13         "street": "Abnobastraße",
  14         "house_number": 3,
  15         "address_suffix": "",
  16     },
  17     "Im Buchbusch": {
  18         "street": "Im Buchbusch",
  19         "house_number": 12,
  20     },
  21     "Eisenbahnstraße": {
  22         "street": "Eisenbahnstraße",
  23         "house_number": 29,
  24         "address_suffix": "-33",
  25     },
  26 }
  27 
  28 ICON_MAP = {
  29     "Restmuell": "mdi:trash-can",
  30     "Biobehaelter": "mdi:leaf",
  31     "Papierbehaelter": "mdi:package-variant",
  32     "Gelbe": "mdi:recycle",
  33     "Grossmuellbehaelter": "mdi:delete-circle",
  34 }
  35 
  36 
  37 API_URL = "https://onlineservices.abfallwirtschaft-pforzheim.de/WasteManagementPforzheim/WasteManagementServlet"
  38 
  39 # Parser for HTML input (hidden) text
  40 
  41 
  42 class HiddenInputParser(HTMLParser):
  43     def __init__(self):
  44         super().__init__()
  45         self._args = {}
  46 
  47     @property
  48     def args(self):
  49         return self._args
  50 
  51     def handle_starttag(self, tag, attrs):
  52         if tag == "input":
  53             d = dict(attrs)
  54             if str(d["type"]).lower() == "hidden":
  55                 self._args[d["name"]] = d["value"] if "value" in d else ""
  56 
  57 
  58 class Source:
  59     def __init__(self, street: str, house_number: int, address_suffix: str = ""):
  60         self._street = street
  61         self._hnr = house_number
  62         self._suffix = address_suffix
  63         self._ics = ICS()
  64 
  65     def fetch(self):
  66         session = requests.session()
  67 
  68         r = session.get(
  69             API_URL,
  70             params={"SubmitAction": "wasteDisposalServices",
  71                     "InFrameMode": "TRUE"},
  72         )
  73         r.raise_for_status()
  74         r.encoding = "utf-8"
  75 
  76         parser = HiddenInputParser()
  77         parser.feed(r.text)
  78 
  79         args = parser.args
  80         args["Ort"] = self._street[0].upper()
  81         args["Strasse"] = self._street
  82         args["Hausnummer"] = str(self._hnr)
  83         args["Hausnummerzusatz"] = self._suffix
  84         args["SubmitAction"] = "CITYCHANGED"
  85         r = session.post(
  86             API_URL,
  87             data=args,
  88         )
  89         r.raise_for_status()
  90 
  91         args["SubmitAction"] = "forward"
  92         args["ContainerGewaehltRM"] = "on"
  93         args["ContainerGewaehltBM"] = "on"
  94         args["ContainerGewaehltLVP"] = "on"
  95         args["ContainerGewaehltPA"] = "on"
  96         args["ContainerGewaehltPrMuell"] = "on"
  97         r = session.post(
  98             API_URL,
  99             data=args,
  100         )
  101         r.raise_for_status()
  102 
  103         args["ApplicationName"] = "com.athos.nl.mvc.abfterm.AbfuhrTerminModel"
  104         args["SubmitAction"] = "filedownload_ICAL"
  105 
  106         r = session.post(
  107             API_URL,
  108             data=args,
  109         )
  110         r.raise_for_status()
  111 
  112         dates = self._ics.convert(r.text)
  113 
  114         entries = []
  115         for d in dates:
  116             entries.append(
  117                 Collection(
  118                     d[0], d[1], ICON_MAP.get(d[1].split(" ")[0])
  119                 )
  120             )
  121         return entries
  122
  ```
  --- 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()
  
  ```
  
golden_diff: diff --git a/custom_components/waste_collection_schedule/waste_collection_schedule/source/abfallwirtschaft_pforzheim_de.py b/custom_components/waste_collection_schedule/waste_collection_schedule/source/abfallwirtschaft_pforzheim_de.py
  --- a/custom_components/waste_collection_schedule/waste_collection_schedule/source/abfallwirtschaft_pforzheim_de.py
  +++ b/custom_components/waste_collection_schedule/waste_collection_schedule/source/abfallwirtschaft_pforzheim_de.py
  @@ -1,3 +1,4 @@
  +from datetime import datetime
   from html.parser import HTMLParser
   
   import requests
  @@ -63,12 +64,21 @@
           self._ics = ICS()
   
       def fetch(self):
  +        now = datetime.now()
  +        entries = self.get_data(now.year)
  +        if now.month == 12:
  +            try:
  +                entries += self.get_data(now.year + 1)
  +            except Exception:
  +                pass
  +        return entries
  +
  +    def get_data(self, year):
           session = requests.session()
   
           r = session.get(
               API_URL,
  -            params={"SubmitAction": "wasteDisposalServices",
  -                    "InFrameMode": "TRUE"},
  +            params={"SubmitAction": "wasteDisposalServices", "InFrameMode": "TRUE"},
           )
           r.raise_for_status()
           r.encoding = "utf-8"
  @@ -82,6 +92,7 @@
           args["Hausnummer"] = str(self._hnr)
           args["Hausnummerzusatz"] = self._suffix
           args["SubmitAction"] = "CITYCHANGED"
  +        args["Zeitraum"] = f"Jahresübersicht {year}"
           r = session.post(
               API_URL,
               data=args,
  @@ -113,9 +124,5 @@
   
           entries = []
           for d in dates:
  -            entries.append(
  -                Collection(
  -                    d[0], d[1], ICON_MAP.get(d[1].split(" ")[0])
  -                )
  -            )
  +            entries.append(Collection(d[0], d[1], ICON_MAP.get(d[1].split(" ")[0])))
           return entries
  
verification_info: {"golden_diff": "diff --git a/custom_components/waste_collection_schedule/waste_collection_schedule/source/abfallwirtschaft_pforzheim_de.py b/custom_components/waste_collection_schedule/waste_collection_schedule/source/abfallwirtschaft_pforzheim_de.py\n--- a/custom_components/waste_collection_schedule/waste_collection_schedule/source/abfallwirtschaft_pforzheim_de.py\n+++ b/custom_components/waste_collection_schedule/waste_collection_schedule/source/abfallwirtschaft_pforzheim_de.py\n@@ -1,3 +1,4 @@\n+from datetime import datetime\n from html.parser import HTMLParser\n \n import requests\n@@ -63,12 +64,21 @@\n         self._ics = ICS()\n \n     def fetch(self):\n+        now = datetime.now()\n+        entries = self.get_data(now.year)\n+        if now.month == 12:\n+            try:\n+                entries += self.get_data(now.year + 1)\n+            except Exception:\n+                pass\n+        return entries\n+\n+    def get_data(self, year):\n         session = requests.session()\n \n         r = session.get(\n             API_URL,\n-            params={\"SubmitAction\": \"wasteDisposalServices\",\n-                    \"InFrameMode\": \"TRUE\"},\n+            params={\"SubmitAction\": \"wasteDisposalServices\", \"InFrameMode\": \"TRUE\"},\n         )\n         r.raise_for_status()\n         r.encoding = \"utf-8\"\n@@ -82,6 +92,7 @@\n         args[\"Hausnummer\"] = str(self._hnr)\n         args[\"Hausnummerzusatz\"] = self._suffix\n         args[\"SubmitAction\"] = \"CITYCHANGED\"\n+        args[\"Zeitraum\"] = f\"Jahres\u00fcbersicht {year}\"\n         r = session.post(\n             API_URL,\n             data=args,\n@@ -113,9 +124,5 @@\n \n         entries = []\n         for d in dates:\n-            entries.append(\n-                Collection(\n-                    d[0], d[1], ICON_MAP.get(d[1].split(\" \")[0])\n-                )\n-            )\n+            entries.append(Collection(d[0], d[1], ICON_MAP.get(d[1].split(\" \")[0])))\n         return entries\n", "issue": "[Bug]: abfallwirtschaft_pforzheim_de has change the URL.\n### I Have A Problem With:\n\nA specific source\n\n### What's Your Problem\n\nThe URL changes from \"https://www.abfallwirtschaft-pforzheim.de/kundenportal/abfallkalender\" to \"https://www.abfallwirtschaft-pforzheim.de/abfallkalender\". On the new Site you need to select a checkbox for the year. I think this option would disappear on the beginning of the next year. But the addon doesnt show me the calendar for 2023 anymore. Its complete empty.\n\n### Source (if relevant)\n\nabfallwirtschaft_pforzheim_de\n\n### Logs\n\n```Shell\nno relevant logs\n```\n\n\n### Relevant Configuration\n\n```YAML\nabfallwirtschaft_pforzheim_de\n```\n\n\n### Checklist Source Error\n\n- [ ] Use the example parameters for your source (often available in the documentation) (don't forget to restart Home Assistant after changing the configuration)\n- [ ] Checked that the website of your service provider is still working\n- [ ] 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- [ ] 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": "from html.parser import HTMLParser\n\nimport requests\nfrom waste_collection_schedule import Collection  # type: ignore[attr-defined]\nfrom waste_collection_schedule.service.ICS import ICS\n\n# Source code based on rh_entsorgung_de.md\nTITLE = \"Abfallwirtschaft Pforzheim\"\nDESCRIPTION = \"Source for Abfallwirtschaft Pforzheim.\"\nURL = \"https://www.abfallwirtschaft-pforzheim.de\"\nTEST_CASES = {\n    \"Abnobstra\u00dfe\": {\n        \"street\": \"Abnobastra\u00dfe\",\n        \"house_number\": 3,\n        \"address_suffix\": \"\",\n    },\n    \"Im Buchbusch\": {\n        \"street\": \"Im Buchbusch\",\n        \"house_number\": 12,\n    },\n    \"Eisenbahnstra\u00dfe\": {\n        \"street\": \"Eisenbahnstra\u00dfe\",\n        \"house_number\": 29,\n        \"address_suffix\": \"-33\",\n    },\n}\n\nICON_MAP = {\n    \"Restmuell\": \"mdi:trash-can\",\n    \"Biobehaelter\": \"mdi:leaf\",\n    \"Papierbehaelter\": \"mdi:package-variant\",\n    \"Gelbe\": \"mdi:recycle\",\n    \"Grossmuellbehaelter\": \"mdi:delete-circle\",\n}\n\n\nAPI_URL = \"https://onlineservices.abfallwirtschaft-pforzheim.de/WasteManagementPforzheim/WasteManagementServlet\"\n\n# Parser for HTML input (hidden) text\n\n\nclass HiddenInputParser(HTMLParser):\n    def __init__(self):\n        super().__init__()\n        self._args = {}\n\n    @property\n    def args(self):\n        return self._args\n\n    def handle_starttag(self, tag, attrs):\n        if tag == \"input\":\n            d = dict(attrs)\n            if str(d[\"type\"]).lower() == \"hidden\":\n                self._args[d[\"name\"]] = d[\"value\"] if \"value\" in d else \"\"\n\n\nclass Source:\n    def __init__(self, street: str, house_number: int, address_suffix: str = \"\"):\n        self._street = street\n        self._hnr = house_number\n        self._suffix = address_suffix\n        self._ics = ICS()\n\n    def fetch(self):\n        session = requests.session()\n\n        r = session.get(\n            API_URL,\n            params={\"SubmitAction\": \"wasteDisposalServices\",\n                    \"InFrameMode\": \"TRUE\"},\n        )\n        r.raise_for_status()\n        r.encoding = \"utf-8\"\n\n        parser = HiddenInputParser()\n        parser.feed(r.text)\n\n        args = parser.args\n        args[\"Ort\"] = self._street[0].upper()\n        args[\"Strasse\"] = self._street\n        args[\"Hausnummer\"] = str(self._hnr)\n        args[\"Hausnummerzusatz\"] = self._suffix\n        args[\"SubmitAction\"] = \"CITYCHANGED\"\n        r = session.post(\n            API_URL,\n            data=args,\n        )\n        r.raise_for_status()\n\n        args[\"SubmitAction\"] = \"forward\"\n        args[\"ContainerGewaehltRM\"] = \"on\"\n        args[\"ContainerGewaehltBM\"] = \"on\"\n        args[\"ContainerGewaehltLVP\"] = \"on\"\n        args[\"ContainerGewaehltPA\"] = \"on\"\n        args[\"ContainerGewaehltPrMuell\"] = \"on\"\n        r = session.post(\n            API_URL,\n            data=args,\n        )\n        r.raise_for_status()\n\n        args[\"ApplicationName\"] = \"com.athos.nl.mvc.abfterm.AbfuhrTerminModel\"\n        args[\"SubmitAction\"] = \"filedownload_ICAL\"\n\n        r = session.post(\n            API_URL,\n            data=args,\n        )\n        r.raise_for_status()\n\n        dates = self._ics.convert(r.text)\n\n        entries = []\n        for d in dates:\n            entries.append(\n                Collection(\n                    d[0], d[1], ICON_MAP.get(d[1].split(\" \")[0])\n                )\n            )\n        return entries\n", "path": "custom_components/waste_collection_schedule/waste_collection_schedule/source/abfallwirtschaft_pforzheim_de.py"}], "after_files": [{"content": "from datetime import datetime\nfrom html.parser import HTMLParser\n\nimport requests\nfrom waste_collection_schedule import Collection  # type: ignore[attr-defined]\nfrom waste_collection_schedule.service.ICS import ICS\n\n# Source code based on rh_entsorgung_de.md\nTITLE = \"Abfallwirtschaft Pforzheim\"\nDESCRIPTION = \"Source for Abfallwirtschaft Pforzheim.\"\nURL = \"https://www.abfallwirtschaft-pforzheim.de\"\nTEST_CASES = {\n    \"Abnobstra\u00dfe\": {\n        \"street\": \"Abnobastra\u00dfe\",\n        \"house_number\": 3,\n        \"address_suffix\": \"\",\n    },\n    \"Im Buchbusch\": {\n        \"street\": \"Im Buchbusch\",\n        \"house_number\": 12,\n    },\n    \"Eisenbahnstra\u00dfe\": {\n        \"street\": \"Eisenbahnstra\u00dfe\",\n        \"house_number\": 29,\n        \"address_suffix\": \"-33\",\n    },\n}\n\nICON_MAP = {\n    \"Restmuell\": \"mdi:trash-can\",\n    \"Biobehaelter\": \"mdi:leaf\",\n    \"Papierbehaelter\": \"mdi:package-variant\",\n    \"Gelbe\": \"mdi:recycle\",\n    \"Grossmuellbehaelter\": \"mdi:delete-circle\",\n}\n\n\nAPI_URL = \"https://onlineservices.abfallwirtschaft-pforzheim.de/WasteManagementPforzheim/WasteManagementServlet\"\n\n# Parser for HTML input (hidden) text\n\n\nclass HiddenInputParser(HTMLParser):\n    def __init__(self):\n        super().__init__()\n        self._args = {}\n\n    @property\n    def args(self):\n        return self._args\n\n    def handle_starttag(self, tag, attrs):\n        if tag == \"input\":\n            d = dict(attrs)\n            if str(d[\"type\"]).lower() == \"hidden\":\n                self._args[d[\"name\"]] = d[\"value\"] if \"value\" in d else \"\"\n\n\nclass Source:\n    def __init__(self, street: str, house_number: int, address_suffix: str = \"\"):\n        self._street = street\n        self._hnr = house_number\n        self._suffix = address_suffix\n        self._ics = ICS()\n\n    def fetch(self):\n        now = datetime.now()\n        entries = self.get_data(now.year)\n        if now.month == 12:\n            try:\n                entries += self.get_data(now.year + 1)\n            except Exception:\n                pass\n        return entries\n\n    def get_data(self, year):\n        session = requests.session()\n\n        r = session.get(\n            API_URL,\n            params={\"SubmitAction\": \"wasteDisposalServices\", \"InFrameMode\": \"TRUE\"},\n        )\n        r.raise_for_status()\n        r.encoding = \"utf-8\"\n\n        parser = HiddenInputParser()\n        parser.feed(r.text)\n\n        args = parser.args\n        args[\"Ort\"] = self._street[0].upper()\n        args[\"Strasse\"] = self._street\n        args[\"Hausnummer\"] = str(self._hnr)\n        args[\"Hausnummerzusatz\"] = self._suffix\n        args[\"SubmitAction\"] = \"CITYCHANGED\"\n        args[\"Zeitraum\"] = f\"Jahres\u00fcbersicht {year}\"\n        r = session.post(\n            API_URL,\n            data=args,\n        )\n        r.raise_for_status()\n\n        args[\"SubmitAction\"] = \"forward\"\n        args[\"ContainerGewaehltRM\"] = \"on\"\n        args[\"ContainerGewaehltBM\"] = \"on\"\n        args[\"ContainerGewaehltLVP\"] = \"on\"\n        args[\"ContainerGewaehltPA\"] = \"on\"\n        args[\"ContainerGewaehltPrMuell\"] = \"on\"\n        r = session.post(\n            API_URL,\n            data=args,\n        )\n        r.raise_for_status()\n\n        args[\"ApplicationName\"] = \"com.athos.nl.mvc.abfterm.AbfuhrTerminModel\"\n        args[\"SubmitAction\"] = \"filedownload_ICAL\"\n\n        r = session.post(\n            API_URL,\n            data=args,\n        )\n        r.raise_for_status()\n\n        dates = self._ics.convert(r.text)\n\n        entries = []\n        for d in dates:\n            entries.append(Collection(d[0], d[1], ICON_MAP.get(d[1].split(\" \")[0])))\n        return entries\n", "path": "custom_components/waste_collection_schedule/waste_collection_schedule/source/abfallwirtschaft_pforzheim_de.py"}]}