prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  [Bug]: source 'City of Karlsruhe' stopped working
  ### I Have A Problem With:
  
  A specific source
  
  ### What's Your Problem
  
  Release 1.44.0:
  Due to changes on the website the source '**City of Karlsruhe**' (name: karlsruhe_de) stopped working.
  I start troubleshooting and add my findings here.
  
  ### Source (if relevant)
  
  karlsruhe_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/source/karlsruhe_de.py`
  Content:
  ```
  1 from datetime import datetime
  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 TITLE = "City of Karlsruhe"
  8 DESCRIPTION = "Source for City of Karlsruhe."
  9 URL = "https://www.karlsruhe.de/"
  10 TEST_CASES = {
  11     "Östliche Rheinbrückenstraße 1": {
  12         "street": "Östliche Rheinbrückenstraße",
  13         "hnr": 1,
  14     },
  15     "Habichtweg 4": {"street": "Habichtweg", "hnr": 4},
  16     "Machstraße 5": {"street": "Machstraße", "hnr": 5},
  17     "Bernsteinstraße 10 ladeort 1": {
  18         "street": "Bernsteinstraße",
  19         "hnr": 10,
  20         "ladeort": 1,
  21     },
  22     "Bernsteinstraße 10 ladeort 2": {
  23         "street": "Bernsteinstraße",
  24         "hnr": 10,
  25         "ladeort": 2,
  26     },
  27 }
  28 
  29 
  30 ICON_MAP = {
  31     "Restmüll": "mdi:trash-can",
  32     "Bioabfall": "mdi:leaf",
  33     "Papier": "mdi:package-variant",
  34     "Wertstoff": "mdi:recycle",
  35     "Sperrmüllabholung": "mdi:wardrobe",
  36 }
  37 
  38 
  39 API_URL = "https://web6.karlsruhe.de/service/abfall/akal/akal_{year}.php"
  40 
  41 
  42 class Source:
  43     def __init__(self, street: str, hnr: str | int, ladeort: int | None = None):
  44         self._street: str = street
  45         self._hnr: str | int = hnr
  46         self._ladeort: int | None = ladeort
  47         self.ics = ICS()
  48 
  49     def fetch(self):
  50         now = datetime.now()
  51         error = None
  52         for year in (now.year, now.year + 1, now.year - 1):
  53             try:
  54                 return self.get_data(API_URL.format(year=year))
  55             except Exception as e:
  56                 error = e
  57         raise error
  58 
  59     def get_data(self, url):
  60         data = {
  61             "strasse_n": self._street,
  62             "hausnr": self._hnr,
  63             "ical": "+iCalendar",
  64             "ladeort": self._ladeort,
  65         }
  66         params = {"hausnr": self._hnr}
  67 
  68         r = requests.post(url, data=data, params=params)
  69         dates = self.ics.convert(r.text)
  70 
  71         entries = []
  72         for d in dates:
  73             date, waste_type = d
  74             waste_type = waste_type.split(",")[0]
  75             icon = ICON_MAP.get(waste_type)
  76             entries.append(Collection(date=date, t=waste_type, icon=icon))
  77 
  78         return entries
  79
  ```
  --- 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/karlsruhe_de.py b/custom_components/waste_collection_schedule/waste_collection_schedule/source/karlsruhe_de.py
  --- a/custom_components/waste_collection_schedule/waste_collection_schedule/source/karlsruhe_de.py
  +++ b/custom_components/waste_collection_schedule/waste_collection_schedule/source/karlsruhe_de.py
  @@ -1,9 +1,17 @@
   from datetime import datetime
   
   import requests
  +import urllib3
   from waste_collection_schedule import Collection  # type: ignore[attr-defined]
   from waste_collection_schedule.service.ICS import ICS
   
  +# With verify=True the POST fails due to a SSLCertVerificationError.
  +# Using verify=False works, but is not ideal. The following links may provide a better way of dealing with this:
  +# https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
  +# https://urllib3.readthedocs.io/en/1.26.x/user-guide.html#ssl
  +# These two lines areused to suppress the InsecureRequestWarning when using verify=False
  +urllib3.disable_warnings()
  +
   TITLE = "City of Karlsruhe"
   DESCRIPTION = "Source for City of Karlsruhe."
   URL = "https://www.karlsruhe.de/"
  @@ -36,7 +44,7 @@
   }
   
   
  -API_URL = "https://web6.karlsruhe.de/service/abfall/akal/akal_{year}.php"
  +API_URL = "https://web{i}.karlsruhe.de/service/abfall/akal/akal_{year}.php"
   
   
   class Source:
  @@ -50,10 +58,11 @@
           now = datetime.now()
           error = None
           for year in (now.year, now.year + 1, now.year - 1):
  -            try:
  -                return self.get_data(API_URL.format(year=year))
  -            except Exception as e:
  -                error = e
  +            for i in (4, 6):
  +                try:
  +                    return self.get_data(API_URL.format(year=year, i=i))
  +                except Exception as e:
  +                    error = e
           raise error
   
       def get_data(self, url):
  @@ -65,7 +74,7 @@
           }
           params = {"hausnr": self._hnr}
   
  -        r = requests.post(url, data=data, params=params)
  +        r = requests.post(url, data=data, params=params, verify=False)
           dates = self.ics.convert(r.text)
   
           entries = []
  
verification_info: {"golden_diff": "diff --git a/custom_components/waste_collection_schedule/waste_collection_schedule/source/karlsruhe_de.py b/custom_components/waste_collection_schedule/waste_collection_schedule/source/karlsruhe_de.py\n--- a/custom_components/waste_collection_schedule/waste_collection_schedule/source/karlsruhe_de.py\n+++ b/custom_components/waste_collection_schedule/waste_collection_schedule/source/karlsruhe_de.py\n@@ -1,9 +1,17 @@\n from datetime import datetime\n \n import requests\n+import urllib3\n from waste_collection_schedule import Collection  # type: ignore[attr-defined]\n from waste_collection_schedule.service.ICS import ICS\n \n+# With verify=True the POST fails due to a SSLCertVerificationError.\n+# Using verify=False works, but is not ideal. The following links may provide a better way of dealing with this:\n+# https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings\n+# https://urllib3.readthedocs.io/en/1.26.x/user-guide.html#ssl\n+# These two lines areused to suppress the InsecureRequestWarning when using verify=False\n+urllib3.disable_warnings()\n+\n TITLE = \"City of Karlsruhe\"\n DESCRIPTION = \"Source for City of Karlsruhe.\"\n URL = \"https://www.karlsruhe.de/\"\n@@ -36,7 +44,7 @@\n }\n \n \n-API_URL = \"https://web6.karlsruhe.de/service/abfall/akal/akal_{year}.php\"\n+API_URL = \"https://web{i}.karlsruhe.de/service/abfall/akal/akal_{year}.php\"\n \n \n class Source:\n@@ -50,10 +58,11 @@\n         now = datetime.now()\n         error = None\n         for year in (now.year, now.year + 1, now.year - 1):\n-            try:\n-                return self.get_data(API_URL.format(year=year))\n-            except Exception as e:\n-                error = e\n+            for i in (4, 6):\n+                try:\n+                    return self.get_data(API_URL.format(year=year, i=i))\n+                except Exception as e:\n+                    error = e\n         raise error\n \n     def get_data(self, url):\n@@ -65,7 +74,7 @@\n         }\n         params = {\"hausnr\": self._hnr}\n \n-        r = requests.post(url, data=data, params=params)\n+        r = requests.post(url, data=data, params=params, verify=False)\n         dates = self.ics.convert(r.text)\n \n         entries = []\n", "issue": "[Bug]: source 'City of Karlsruhe' stopped working\n### I Have A Problem With:\n\nA specific source\n\n### What's Your Problem\n\nRelease 1.44.0:\r\nDue to changes on the website the source '**City of Karlsruhe**' (name: karlsruhe_de) stopped working.\r\nI start troubleshooting and add my findings here.\n\n### Source (if relevant)\n\nkarlsruhe_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": "from datetime import datetime\n\nimport requests\nfrom waste_collection_schedule import Collection  # type: ignore[attr-defined]\nfrom waste_collection_schedule.service.ICS import ICS\n\nTITLE = \"City of Karlsruhe\"\nDESCRIPTION = \"Source for City of Karlsruhe.\"\nURL = \"https://www.karlsruhe.de/\"\nTEST_CASES = {\n    \"\u00d6stliche Rheinbr\u00fcckenstra\u00dfe 1\": {\n        \"street\": \"\u00d6stliche Rheinbr\u00fcckenstra\u00dfe\",\n        \"hnr\": 1,\n    },\n    \"Habichtweg 4\": {\"street\": \"Habichtweg\", \"hnr\": 4},\n    \"Machstra\u00dfe 5\": {\"street\": \"Machstra\u00dfe\", \"hnr\": 5},\n    \"Bernsteinstra\u00dfe 10 ladeort 1\": {\n        \"street\": \"Bernsteinstra\u00dfe\",\n        \"hnr\": 10,\n        \"ladeort\": 1,\n    },\n    \"Bernsteinstra\u00dfe 10 ladeort 2\": {\n        \"street\": \"Bernsteinstra\u00dfe\",\n        \"hnr\": 10,\n        \"ladeort\": 2,\n    },\n}\n\n\nICON_MAP = {\n    \"Restm\u00fcll\": \"mdi:trash-can\",\n    \"Bioabfall\": \"mdi:leaf\",\n    \"Papier\": \"mdi:package-variant\",\n    \"Wertstoff\": \"mdi:recycle\",\n    \"Sperrm\u00fcllabholung\": \"mdi:wardrobe\",\n}\n\n\nAPI_URL = \"https://web6.karlsruhe.de/service/abfall/akal/akal_{year}.php\"\n\n\nclass Source:\n    def __init__(self, street: str, hnr: str | int, ladeort: int | None = None):\n        self._street: str = street\n        self._hnr: str | int = hnr\n        self._ladeort: int | None = ladeort\n        self.ics = ICS()\n\n    def fetch(self):\n        now = datetime.now()\n        error = None\n        for year in (now.year, now.year + 1, now.year - 1):\n            try:\n                return self.get_data(API_URL.format(year=year))\n            except Exception as e:\n                error = e\n        raise error\n\n    def get_data(self, url):\n        data = {\n            \"strasse_n\": self._street,\n            \"hausnr\": self._hnr,\n            \"ical\": \"+iCalendar\",\n            \"ladeort\": self._ladeort,\n        }\n        params = {\"hausnr\": self._hnr}\n\n        r = requests.post(url, data=data, params=params)\n        dates = self.ics.convert(r.text)\n\n        entries = []\n        for d in dates:\n            date, waste_type = d\n            waste_type = waste_type.split(\",\")[0]\n            icon = ICON_MAP.get(waste_type)\n            entries.append(Collection(date=date, t=waste_type, icon=icon))\n\n        return entries\n", "path": "custom_components/waste_collection_schedule/waste_collection_schedule/source/karlsruhe_de.py"}], "after_files": [{"content": "from datetime import datetime\n\nimport requests\nimport urllib3\nfrom waste_collection_schedule import Collection  # type: ignore[attr-defined]\nfrom waste_collection_schedule.service.ICS import ICS\n\n# With verify=True the POST fails due to a SSLCertVerificationError.\n# Using verify=False works, but is not ideal. The following links may provide a better way of dealing with this:\n# https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings\n# https://urllib3.readthedocs.io/en/1.26.x/user-guide.html#ssl\n# These two lines areused to suppress the InsecureRequestWarning when using verify=False\nurllib3.disable_warnings()\n\nTITLE = \"City of Karlsruhe\"\nDESCRIPTION = \"Source for City of Karlsruhe.\"\nURL = \"https://www.karlsruhe.de/\"\nTEST_CASES = {\n    \"\u00d6stliche Rheinbr\u00fcckenstra\u00dfe 1\": {\n        \"street\": \"\u00d6stliche Rheinbr\u00fcckenstra\u00dfe\",\n        \"hnr\": 1,\n    },\n    \"Habichtweg 4\": {\"street\": \"Habichtweg\", \"hnr\": 4},\n    \"Machstra\u00dfe 5\": {\"street\": \"Machstra\u00dfe\", \"hnr\": 5},\n    \"Bernsteinstra\u00dfe 10 ladeort 1\": {\n        \"street\": \"Bernsteinstra\u00dfe\",\n        \"hnr\": 10,\n        \"ladeort\": 1,\n    },\n    \"Bernsteinstra\u00dfe 10 ladeort 2\": {\n        \"street\": \"Bernsteinstra\u00dfe\",\n        \"hnr\": 10,\n        \"ladeort\": 2,\n    },\n}\n\n\nICON_MAP = {\n    \"Restm\u00fcll\": \"mdi:trash-can\",\n    \"Bioabfall\": \"mdi:leaf\",\n    \"Papier\": \"mdi:package-variant\",\n    \"Wertstoff\": \"mdi:recycle\",\n    \"Sperrm\u00fcllabholung\": \"mdi:wardrobe\",\n}\n\n\nAPI_URL = \"https://web{i}.karlsruhe.de/service/abfall/akal/akal_{year}.php\"\n\n\nclass Source:\n    def __init__(self, street: str, hnr: str | int, ladeort: int | None = None):\n        self._street: str = street\n        self._hnr: str | int = hnr\n        self._ladeort: int | None = ladeort\n        self.ics = ICS()\n\n    def fetch(self):\n        now = datetime.now()\n        error = None\n        for year in (now.year, now.year + 1, now.year - 1):\n            for i in (4, 6):\n                try:\n                    return self.get_data(API_URL.format(year=year, i=i))\n                except Exception as e:\n                    error = e\n        raise error\n\n    def get_data(self, url):\n        data = {\n            \"strasse_n\": self._street,\n            \"hausnr\": self._hnr,\n            \"ical\": \"+iCalendar\",\n            \"ladeort\": self._ladeort,\n        }\n        params = {\"hausnr\": self._hnr}\n\n        r = requests.post(url, data=data, params=params, verify=False)\n        dates = self.ics.convert(r.text)\n\n        entries = []\n        for d in dates:\n            date, waste_type = d\n            waste_type = waste_type.split(\",\")[0]\n            icon = ICON_MAP.get(waste_type)\n            entries.append(Collection(date=date, t=waste_type, icon=icon))\n\n        return entries\n", "path": "custom_components/waste_collection_schedule/waste_collection_schedule/source/karlsruhe_de.py"}]}