prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  [Bug]: adur_worthing_gov_uk has changed format of address
  ### I Have A Problem With:
  
  A specific source
  
  ### What's Your Problem
  
  The Adur and Worthing council used to return my address as “12 Roadname”, so that’s what I had in my source args. But the format has recently changed to “12 ROADNAME”, causing the lookup in adur_worthing_gov_uk.py to fail. 
  
  As the council is just as likely to change it back at some point can I suggest that the lookup is made case independent?
  
  ### Source (if relevant)
  
  adur_worthing_gov_uk
  
  ### 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.
  
  </issue>
  <code>
  [start of custom_components/waste_collection_schedule/waste_collection_schedule/source/adur_worthing_gov_uk.py]
  1 from datetime import datetime
  2 
  3 import bs4
  4 import requests
  5 from waste_collection_schedule import Collection  # type: ignore[attr-defined]
  6 
  7 TITLE = "Adur & Worthing Councils"
  8 DESCRIPTION = "Source for adur-worthing.gov.uk services for Adur & Worthing, UK."
  9 URL = "https://adur-worthing.gov.uk"
  10 TEST_CASES = {
  11     "Test_001": {"postcode": "BN15 9UX", "address": "1 Western Road North"},
  12     "Test_002": {"postcode": "BN43 5WE", "address": "6 Hebe Road"},
  13 }
  14 HEADERS = {
  15     "user-agent": "Mozilla/5.0",
  16 }
  17 ICON_MAP = {
  18     "Recycling": "mdi:recycle",
  19     "Refuse": "mdi:trash-can",
  20     "Garden": "mdi:leaf",
  21 }
  22 
  23 
  24 class Source:
  25     def __init__(self, postcode, address):
  26         self._postcode = postcode
  27         self._address = address
  28 
  29     def fetch(self):
  30 
  31         if self._postcode is None or self._address is None:
  32             raise ValueError("Either postcode or address is None")
  33 
  34         s = requests.Session()
  35 
  36         postcode_search_request = s.get(
  37             f"https://www.adur-worthing.gov.uk/bin-day/?brlu-address-postcode={self._postcode}&return-url=/bin-day/&action=search",
  38             headers=HEADERS,
  39         )
  40         html_addresses = postcode_search_request.content
  41         addresses = bs4.BeautifulSoup(html_addresses, "html.parser")
  42         addresses_select = addresses.find("select", {"id": "brlu-selected-address"})
  43 
  44         found_address = None
  45         for address in addresses_select.find_all("option"):
  46             if self._address in address.get_text():
  47                 found_address = address
  48 
  49         if found_address is None:
  50             raise ValueError("Address not found")
  51 
  52         collections_request = s.get(
  53             f"https://www.adur-worthing.gov.uk/bin-day/?brlu-selected-address={address['value']}&return-url=/bin-day/",
  54             headers=HEADERS,
  55         )
  56         html_collections = collections_request.content
  57         bin_collections = bs4.BeautifulSoup(html_collections, "html.parser")
  58 
  59         bin_days_table = bin_collections.find("table", class_="bin-days")
  60         bin_days_table_body = bin_days_table.find("tbody")
  61         bin_days_by_type = bin_days_table_body.find_all("tr")
  62 
  63         entries = []
  64 
  65         for bin_by_type in bin_days_by_type:
  66             bin_type = bin_by_type.find("th").text
  67             icon = ICON_MAP.get(bin_type)
  68             bin_days = bin_by_type.find_all("td")[-1].get_text(separator="\n")
  69             for bin_day in bin_days.split("\n"):
  70                 bin_datetime = datetime.strptime(bin_day, "%A %d %b %Y").date()
  71                 entries.append(Collection(t=bin_type, date=bin_datetime, icon=icon))
  72 
  73         return entries
  74
  [end of custom_components/waste_collection_schedule/waste_collection_schedule/source/adur_worthing_gov_uk.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/custom_components/waste_collection_schedule/waste_collection_schedule/source/adur_worthing_gov_uk.py b/custom_components/waste_collection_schedule/waste_collection_schedule/source/adur_worthing_gov_uk.py
  --- a/custom_components/waste_collection_schedule/waste_collection_schedule/source/adur_worthing_gov_uk.py
  +++ b/custom_components/waste_collection_schedule/waste_collection_schedule/source/adur_worthing_gov_uk.py
  @@ -27,7 +27,6 @@
           self._address = address
   
       def fetch(self):
  -
           if self._postcode is None or self._address is None:
               raise ValueError("Either postcode or address is None")
   
  @@ -43,7 +42,7 @@
   
           found_address = None
           for address in addresses_select.find_all("option"):
  -            if self._address in address.get_text():
  +            if self._address.upper() in address.get_text().upper():
                   found_address = address
   
           if found_address is None:
  
verification_info: {"golden_diff": "diff --git a/custom_components/waste_collection_schedule/waste_collection_schedule/source/adur_worthing_gov_uk.py b/custom_components/waste_collection_schedule/waste_collection_schedule/source/adur_worthing_gov_uk.py\n--- a/custom_components/waste_collection_schedule/waste_collection_schedule/source/adur_worthing_gov_uk.py\n+++ b/custom_components/waste_collection_schedule/waste_collection_schedule/source/adur_worthing_gov_uk.py\n@@ -27,7 +27,6 @@\n         self._address = address\n \n     def fetch(self):\n-\n         if self._postcode is None or self._address is None:\n             raise ValueError(\"Either postcode or address is None\")\n \n@@ -43,7 +42,7 @@\n \n         found_address = None\n         for address in addresses_select.find_all(\"option\"):\n-            if self._address in address.get_text():\n+            if self._address.upper() in address.get_text().upper():\n                 found_address = address\n \n         if found_address is None:\n", "issue": "[Bug]: adur_worthing_gov_uk has changed format of address\n### I Have A Problem With:\n\nA specific source\n\n### What's Your Problem\n\nThe Adur and Worthing council used to return my address as \u201c12 Roadname\u201d, so that\u2019s what I had in my source args. But the format has recently changed to \u201c12 ROADNAME\u201d, causing the lookup in adur_worthing_gov_uk.py to fail. \r\n\r\nAs the council is just as likely to change it back at some point can I suggest that the lookup is made case independent?\n\n### Source (if relevant)\n\nadur_worthing_gov_uk\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 bs4\nimport requests\nfrom waste_collection_schedule import Collection  # type: ignore[attr-defined]\n\nTITLE = \"Adur & Worthing Councils\"\nDESCRIPTION = \"Source for adur-worthing.gov.uk services for Adur & Worthing, UK.\"\nURL = \"https://adur-worthing.gov.uk\"\nTEST_CASES = {\n    \"Test_001\": {\"postcode\": \"BN15 9UX\", \"address\": \"1 Western Road North\"},\n    \"Test_002\": {\"postcode\": \"BN43 5WE\", \"address\": \"6 Hebe Road\"},\n}\nHEADERS = {\n    \"user-agent\": \"Mozilla/5.0\",\n}\nICON_MAP = {\n    \"Recycling\": \"mdi:recycle\",\n    \"Refuse\": \"mdi:trash-can\",\n    \"Garden\": \"mdi:leaf\",\n}\n\n\nclass Source:\n    def __init__(self, postcode, address):\n        self._postcode = postcode\n        self._address = address\n\n    def fetch(self):\n\n        if self._postcode is None or self._address is None:\n            raise ValueError(\"Either postcode or address is None\")\n\n        s = requests.Session()\n\n        postcode_search_request = s.get(\n            f\"https://www.adur-worthing.gov.uk/bin-day/?brlu-address-postcode={self._postcode}&return-url=/bin-day/&action=search\",\n            headers=HEADERS,\n        )\n        html_addresses = postcode_search_request.content\n        addresses = bs4.BeautifulSoup(html_addresses, \"html.parser\")\n        addresses_select = addresses.find(\"select\", {\"id\": \"brlu-selected-address\"})\n\n        found_address = None\n        for address in addresses_select.find_all(\"option\"):\n            if self._address in address.get_text():\n                found_address = address\n\n        if found_address is None:\n            raise ValueError(\"Address not found\")\n\n        collections_request = s.get(\n            f\"https://www.adur-worthing.gov.uk/bin-day/?brlu-selected-address={address['value']}&return-url=/bin-day/\",\n            headers=HEADERS,\n        )\n        html_collections = collections_request.content\n        bin_collections = bs4.BeautifulSoup(html_collections, \"html.parser\")\n\n        bin_days_table = bin_collections.find(\"table\", class_=\"bin-days\")\n        bin_days_table_body = bin_days_table.find(\"tbody\")\n        bin_days_by_type = bin_days_table_body.find_all(\"tr\")\n\n        entries = []\n\n        for bin_by_type in bin_days_by_type:\n            bin_type = bin_by_type.find(\"th\").text\n            icon = ICON_MAP.get(bin_type)\n            bin_days = bin_by_type.find_all(\"td\")[-1].get_text(separator=\"\\n\")\n            for bin_day in bin_days.split(\"\\n\"):\n                bin_datetime = datetime.strptime(bin_day, \"%A %d %b %Y\").date()\n                entries.append(Collection(t=bin_type, date=bin_datetime, icon=icon))\n\n        return entries\n", "path": "custom_components/waste_collection_schedule/waste_collection_schedule/source/adur_worthing_gov_uk.py"}]}