From 9527812cbb79fdb10b513b9526953b04a6a32dfd Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 6 Nov 2024 01:20:31 +0000 Subject: [PATCH 1/8] =?UTF-8?q?bump:=20version=200.111.0=20=E2=86=92=200.1?= =?UTF-8?q?12.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 52 +++++++++++++++++++ .../uk_bin_collection/config_flow.py | 2 +- .../uk_bin_collection/manifest.json | 4 +- pyproject.toml | 2 +- 4 files changed, 56 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e4fe35eea..e4d2f0b770 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,56 @@ ======= +## 0.112.0 (2024-11-06) + +### Feat + +- pytest fixes +- pytest fixes +- pytest fixes +- pytest fixes +- pytest fixes +- Adding Powys Council +- Adding Worcester City Council +- Adding Ards and North Down Council +- Adding East Herts Council +- Adding Ashford Borough Council +- Adding Stockton On Tees Council +- Adding Fife Council +- Adding Flintshire County Council +- Adding Teignbridge Council +- Adding Harborough District Council +- Adding Watford Borough Council +- Adding Coventry City Council + +### Fix + +- CC testing and add Chesterfield +- CC testing and add Chesterfield +- CC testing and add Chesterfield +- pytest-homeassistant-custom-component +- Pydandic version +- Pydandic version +- WestOxfordshireDistrictCouncil +- South Norfolk Council +- ForestOfDeanDistrictCouncil +- Croydon Council +- South Kesteven District Council +- #647 +- #630 +- #623 +- #586 +- #578 +- #389 +- #930 +- #933 +- #750 +- Refactor Midlothian Council scraper to use house number and postcode +- West Berkshire Council +- Southwark Council +- #580 +- #888 +- #902 +- #607 + ## 0.111.0 (2024-11-06) ### Fix diff --git a/custom_components/uk_bin_collection/config_flow.py b/custom_components/uk_bin_collection/config_flow.py index 3427a11192..b6f880f066 100644 --- a/custom_components/uk_bin_collection/config_flow.py +++ b/custom_components/uk_bin_collection/config_flow.py @@ -209,7 +209,7 @@ async def async_step_reconfigure_confirm( async def get_councils_json(self) -> Dict[str, Any]: """Fetch and return the supported councils data.""" - url = "https://raw.githubusercontent.com/robbrad/UKBinCollectionData/0.111.0/uk_bin_collection/tests/input.json" + url = "https://raw.githubusercontent.com/robbrad/UKBinCollectionData/0.112.0/uk_bin_collection/tests/input.json" try: async with aiohttp.ClientSession() as session: async with session.get(url) as response: diff --git a/custom_components/uk_bin_collection/manifest.json b/custom_components/uk_bin_collection/manifest.json index aa79ea72a2..1d8b993630 100644 --- a/custom_components/uk_bin_collection/manifest.json +++ b/custom_components/uk_bin_collection/manifest.json @@ -9,7 +9,7 @@ "integration_type": "service", "iot_class": "cloud_polling", "issue_tracker": "https://github.com/robbrad/UKBinCollectionData/issues", - "requirements": ["uk-bin-collection>=0.111.0"], - "version": "0.111.0", + "requirements": ["uk-bin-collection>=0.112.0"], + "version": "0.112.0", "zeroconf": [] } diff --git a/pyproject.toml b/pyproject.toml index f3a5c9df58..eea0fa8ba2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "uk_bin_collection" -version = "0.111.0" +version = "0.112.0" description = "Python Lib to collect UK Bin Data" readme = "README.md" authors = ["Robert Bradley "] From 23befa29c9aac2c3e080df64f52fd67d0d00ed3c Mon Sep 17 00:00:00 2001 From: Jordan Pitcairn Date: Thu, 7 Nov 2024 21:15:42 +0000 Subject: [PATCH 2/8] feat: Nuneaton and Bedworth Borough Council --- uk_bin_collection/tests/input.json | 7 + .../NuneatonBedworthBoroughCouncil.py | 931 ++++++++++++++++++ 2 files changed, 938 insertions(+) create mode 100644 uk_bin_collection/uk_bin_collection/councils/NuneatonBedworthBoroughCouncil.py diff --git a/uk_bin_collection/tests/input.json b/uk_bin_collection/tests/input.json index 5578ea806b..c3a9dab416 100644 --- a/uk_bin_collection/tests/input.json +++ b/uk_bin_collection/tests/input.json @@ -1141,6 +1141,13 @@ "wiki_name": "Nottingham City Council", "wiki_note": "Pass the UPRN. You can find it using [FindMyAddress](https://www.findmyaddress.co.uk/search)." }, + "NuneatonBedworthBoroughCouncil": { + "url": "https://www.nuneatonandbedworth.gov.uk", + "wiki_name": "Nuneaton and Bedworth Borough Council", + "skip_get_url": true, + "house_number": "Newdigate Road", + "wiki_note": "Pass the name of the street ONLY in the house number parameter, wrapped in double quotes. Street name must match exactly as it appears on the council's website." + }, "OldhamCouncil": { "url": "https://portal.oldham.gov.uk/bincollectiondates/details?uprn=422000033556", "wiki_name": "Oldham Council", diff --git a/uk_bin_collection/uk_bin_collection/councils/NuneatonBedworthBoroughCouncil.py b/uk_bin_collection/uk_bin_collection/councils/NuneatonBedworthBoroughCouncil.py new file mode 100644 index 0000000000..ed710e0d4f --- /dev/null +++ b/uk_bin_collection/uk_bin_collection/councils/NuneatonBedworthBoroughCouncil.py @@ -0,0 +1,931 @@ +from bs4 import BeautifulSoup +from uk_bin_collection.uk_bin_collection.common import * +from uk_bin_collection.uk_bin_collection.get_bin_data import AbstractGetBinDataClass + +from bs4 import BeautifulSoup +import urllib.parse +import requests +import re + +class CouncilClass(AbstractGetBinDataClass): + def parse_data(self, page: str, **kwargs) -> dict: + + data = {"bins": []} + + + + street = urllib.parse.quote_plus(kwargs.get("paon")) + base_url = "https://www.nuneatonandbedworth.gov.uk/" + search_query = f"directory/search?directoryID=3&showInMap=&keywords={street}&search=Search+directory" + + search_response = requests.get(base_url + search_query) + + if search_response.status_code == 200: + soup = BeautifulSoup(search_response.content, 'html.parser') + street_link_tags = soup.find_all('a', class_='list__link') + + street_name = kwargs.get("paon").lower() + matches = [tag for tag in street_link_tags if street_name in tag.text.lower()] + + if len(matches) == 1: + street_url = matches[0]['href'] + full_url = base_url.rstrip('/') + street_url + bin_data = self.get_bin_data(full_url) + + for k, v in bin_data.items(): + for date in v: + dict_data = { + "type": k, + "collectionDate": date + } + data["bins"].append(dict_data) + + return data + + elif len(matches) > 1: + Exception("Multiple street URLs found. Please refine your search.") + else: + Exception("Street URL not found.") + else: + Exception("Failed to retrieve search results.") + + return data + + def get_bin_data(self, url) -> dict: + + bin_day_response = requests.get(url) + + if bin_day_response.status_code == 200: + + soup = BeautifulSoup(bin_day_response.content, 'html.parser') + + download_link = soup.find('a', {'href': re.compile(r'/downloads/file')}) + + + if download_link: + file_url = download_link['href'] + filename = file_url.split('/')[-1] + + bin_data = { + "bin-calendar-friday-b": { + "Black Bin": [ + "2024-10-04", + "2024-10-18", + "2024-11-01", + "2024-11-15", + "2024-11-29", + "2024-12-13", + "2024-12-27", + "2025-01-10", + "2025-01-24", + "2025-02-07", + "2025-02-21", + "2025-03-07", + "2025-03-21", + "2025-04-04", + "2025-04-18", + "2025-05-02", + "2025-05-16", + "2025-05-30", + "2025-06-13", + "2025-06-27", + "2025-07-11", + "2025-07-25", + "2025-08-08", + "2025-08-22", + "2025-09-05", + "2025-09-19" + ], + "Brown Bin": [ + "2024-10-11", + "2024-10-25", + "2024-11-08", + "2024-11-22", + "2024-12-06", + "2024-12-20", + "2025-01-03", + "2025-01-17", + "2025-01-31", + "2025-02-14", + "2025-02-28", + "2025-03-14", + "2025-03-28", + "2025-04-11", + "2025-04-25", + "2025-05-09", + "2025-05-23", + "2025-06-06", + "2025-06-20", + "2025-07-04", + "2025-07-18", + "2025-08-01", + "2025-08-15", + "2025-08-29", + "2025-09-12", + "2025-09-26" + ], + "Green Bin": [ + "2024-10-11", + "2024-10-25", + "2024-11-08", + "2024-11-22", + "2024-12-06", + "2024-12-20", + "2025-01-03", + "2025-01-17", + "2025-02-14", + "2025-02-28", + "2025-03-14", + "2025-03-28", + "2025-04-11", + "2025-04-25", + "2025-05-09", + "2025-05-23", + "2025-06-06", + "2025-06-20", + "2025-07-04", + "2025-07-18", + "2025-08-01", + "2025-08-15", + "2025-08-29", + "2025-09-12", + "2025-09-26" + ] + }, + "bin-calendar-thursday-b": { + "Black Bin": [ + "2024-10-03", + "2024-10-17", + "2024-10-31", + "2024-11-14", + "2024-11-28", + "2024-12-12", + "2024-12-26", + "2025-01-09", + "2025-01-23", + "2025-02-06", + "2025-02-20", + "2025-03-06", + "2025-03-20", + "2025-04-03", + "2025-04-17", + "2025-05-01", + "2025-05-15", + "2025-05-29", + "2025-06-12", + "2025-06-26", + "2025-07-10", + "2025-07-24", + "2025-08-07", + "2025-08-21", + "2025-09-04", + "2025-09-18" + ], + "Brown Bin": [ + "2024-10-10", + "2024-10-24", + "2024-11-07", + "2024-11-21", + "2024-12-05", + "2024-12-19", + "2025-01-02", + "2025-01-16", + "2025-01-30", + "2025-02-13", + "2025-02-27", + "2025-03-13", + "2025-03-27", + "2025-04-10", + "2025-04-24", + "2025-05-08", + "2025-05-22", + "2025-06-05", + "2025-06-19", + "2025-07-03", + "2025-07-17", + "2025-07-31", + "2025-08-14", + "2025-08-28", + "2025-09-11", + "2025-09-25" + ], + "Green Bin": [ + "2024-10-10", + "2024-10-24", + "2024-11-07", + "2024-11-21", + "2024-12-05", + "2024-12-19", + "2025-01-02", + "2025-01-16", + "2025-02-13", + "2025-02-27", + "2025-03-13", + "2025-03-27", + "2025-04-10", + "2025-04-24", + "2025-05-08", + "2025-05-22", + "2025-06-05", + "2025-06-19", + "2025-07-03", + "2025-07-17", + "2025-07-31", + "2025-08-14", + "2025-08-28", + "2025-09-11", + "2025-09-25" + ] + }, + "bin-calendar-wednesday-b": { + "Black Bin": [ + "2024-10-02", + "2024-10-16", + "2024-10-30", + "2024-11-13", + "2024-11-27", + "2024-12-11", + "2024-12-25", + "2025-01-08", + "2025-01-22", + "2025-02-05", + "2025-02-19", + "2025-03-05", + "2025-03-19", + "2025-04-02", + "2025-04-16", + "2025-04-30", + "2025-05-14", + "2025-05-28", + "2025-06-11", + "2025-06-25", + "2025-07-09", + "2025-07-23", + "2025-08-06", + "2025-08-20", + "2025-09-03", + "2025-09-17" + ], + "Brown Bin": [ + "2024-10-09", + "2024-10-23", + "2024-11-06", + "2024-11-20", + "2024-12-04", + "2024-12-18", + "2025-01-01", + "2025-01-15", + "2025-01-29", + "2025-02-12", + "2025-02-26", + "2025-03-12", + "2025-03-26", + "2025-04-09", + "2025-04-23", + "2025-05-07", + "2025-05-21", + "2025-06-04", + "2025-06-18", + "2025-07-02", + "2025-07-16", + "2025-07-30", + "2025-08-13", + "2025-08-27", + "2025-09-10", + "2025-09-24" + ], + "Green Bin": [ + "2024-10-09", + "2024-10-23", + "2024-11-06", + "2024-11-20", + "2024-12-04", + "2024-12-18", + "2025-01-01", + "2025-01-15", + "2025-02-12", + "2025-02-26", + "2025-03-12", + "2025-03-26", + "2025-04-09", + "2025-04-23", + "2025-05-07", + "2025-05-21", + "2025-06-04", + "2025-06-18", + "2025-07-02", + "2025-07-16", + "2025-07-30", + "2025-08-13", + "2025-08-27", + "2025-09-10", + "2025-09-24" + ] + }, + "bin-calendar-tuesday-b": { + "Black Bin": [ + "2024-10-01", + "2024-10-15", + "2024-10-29", + "2024-11-12", + "2024-11-26", + "2024-12-10", + "2024-12-24", + "2025-01-07", + "2025-01-21", + "2025-02-04", + "2025-02-18", + "2025-03-04", + "2025-03-18", + "2025-04-01", + "2025-04-15", + "2025-04-29", + "2025-05-13", + "2025-05-27", + "2025-06-10", + "2025-06-24", + "2025-07-08", + "2025-07-22", + "2025-08-05", + "2025-08-19", + "2025-09-02", + "2025-09-16", + "2025-09-30" + ], + "Brown Bin": [ + "2024-10-08", + "2024-10-22", + "2024-11-05", + "2024-11-19", + "2024-12-03", + "2024-12-17", + "2024-12-31", + "2025-01-14", + "2025-01-28", + "2025-02-11", + "2025-02-25", + "2025-03-11", + "2025-03-25", + "2025-04-08", + "2025-04-22", + "2025-05-06", + "2025-05-20", + "2025-06-03", + "2025-06-17", + "2025-07-01", + "2025-07-15", + "2025-07-29", + "2025-08-12", + "2025-08-26", + "2025-09-09", + "2025-09-23" + ], + "Green Bin": [ + "2024-10-08", + "2024-10-22", + "2024-11-05", + "2024-11-19", + "2024-12-03", + "2024-12-17", + "2024-12-31", + "2025-01-14", + "2025-02-11", + "2025-02-25", + "2025-03-11", + "2025-03-25", + "2025-04-08", + "2025-04-22", + "2025-05-06", + "2025-05-20", + "2025-06-03", + "2025-06-17", + "2025-07-01", + "2025-07-15", + "2025-07-29", + "2025-08-12", + "2025-08-26", + "2025-09-09", + "2025-09-23" + ] + }, + "bin-calendar-monday-b": { + "Black Bin": [ + "2024-10-14", + "2024-10-28", + "2024-11-11", + "2024-11-25", + "2024-12-09", + "2024-12-23", + "2025-01-06", + "2025-01-20", + "2025-02-03", + "2025-02-17", + "2025-03-03", + "2025-03-17", + "2025-03-31", + "2025-04-14", + "2025-04-28", + "2025-05-12", + "2025-05-26", + "2025-06-09", + "2025-06-23", + "2025-07-07", + "2025-07-21", + "2025-08-04", + "2025-08-18", + "2025-09-01", + "2025-09-15", + "2025-09-29" + ], + "Brown Bin": [ + "2024-10-07", + "2024-10-21", + "2024-11-04", + "2024-11-18", + "2024-12-02", + "2024-12-16", + "2024-12-30", + "2025-01-13", + "2025-01-27", + "2025-02-10", + "2025-02-24", + "2025-03-10", + "2025-03-24", + "2025-04-07", + "2025-04-21", + "2025-05-05", + "2025-05-19", + "2025-06-02", + "2025-06-16", + "2025-06-30", + "2025-07-14", + "2025-07-28", + "2025-08-11", + "2025-08-25", + "2025-09-08", + "2025-09-22" + ], + "Green Bin": [ + "2024-10-07", + "2024-10-21", + "2024-11-04", + "2024-11-18", + "2024-12-02", + "2024-12-16", + "2024-12-30", + "2025-01-13", + "2025-02-10", + "2025-02-24", + "2025-03-10", + "2025-03-24", + "2025-04-07", + "2025-04-21", + "2025-05-05", + "2025-05-19", + "2025-06-02", + "2025-06-16", + "2025-06-30", + "2025-07-14", + "2025-07-28", + "2025-08-11", + "2025-08-25", + "2025-09-08", + "2025-09-22" + ] + }, + "bin-calendar-friday-a": { + "Black Bin": [ + "2024-10-11", + "2024-10-25", + "2024-11-08", + "2024-11-22", + "2024-12-06", + "2024-12-20", + "2025-01-03", + "2025-01-17", + "2025-01-31", + "2025-02-14", + "2025-02-28", + "2025-03-14", + "2025-03-28", + "2025-04-11", + "2025-04-25", + "2025-05-09", + "2025-05-23", + "2025-06-06", + "2025-06-20", + "2025-07-04", + "2025-07-18", + "2025-08-01", + "2025-08-15", + "2025-08-29", + "2025-09-12", + "2025-09-26" + ], + "Brown Bin": [ + "2024-10-04", + "2024-10-18", + "2024-11-01", + "2024-11-15", + "2024-11-29", + "2024-12-13", + "2024-12-27", + "2025-01-10", + "2025-01-24", + "2025-02-07", + "2025-02-21", + "2025-03-07", + "2025-03-21", + "2025-04-04", + "2025-04-18", + "2025-05-02", + "2025-05-16", + "2025-05-30", + "2025-06-13", + "2025-06-27", + "2025-07-11", + "2025-07-25", + "2025-08-08", + "2025-08-22", + "2025-09-05", + "2025-09-19" + ], + "Green Bin": [ + "2024-10-04", + "2024-10-18", + "2024-11-01", + "2024-11-15", + "2024-11-29", + "2024-12-13", + "2024-12-27", + "2025-01-10", + "2025-02-07", + "2025-02-21", + "2025-03-07", + "2025-03-21", + "2025-04-04", + "2025-04-18", + "2025-05-02", + "2025-05-16", + "2025-05-30", + "2025-06-13", + "2025-06-27", + "2025-07-11", + "2025-07-25", + "2025-08-08", + "2025-08-22", + "2025-09-05", + "2025-09-19" + ] + }, + "bin-calendar-thursday-a": { + "Black Bin": [ + "2024-10-10", + "2024-10-24", + "2024-11-07", + "2024-11-21", + "2024-12-05", + "2024-12-19", + "2025-01-02", + "2025-01-16", + "2025-01-30", + "2025-02-13", + "2025-02-27", + "2025-03-13", + "2025-03-27", + "2025-04-10", + "2025-04-24", + "2025-05-08", + "2025-05-22", + "2025-06-05", + "2025-06-19", + "2025-07-03", + "2025-07-17", + "2025-07-31", + "2025-08-14", + "2025-08-28", + "2025-09-11", + "2025-09-25" + ], + "Brown Bin": [ + "2024-10-03", + "2024-10-17", + "2024-10-31", + "2024-11-14", + "2024-11-28", + "2024-12-12", + "2024-12-26", + "2025-01-09", + "2025-01-23", + "2025-02-06", + "2025-02-20", + "2025-03-06", + "2025-03-20", + "2025-04-03", + "2025-04-17", + "2025-05-01", + "2025-05-15", + "2025-05-29", + "2025-06-12", + "2025-06-26", + "2025-07-10", + "2025-07-24", + "2025-08-07", + "2025-08-21", + "2025-09-04", + "2025-09-18" + ], + "Green Bin": [ + "2024-10-03", + "2024-10-17", + "2024-10-31", + "2024-11-14", + "2024-11-28", + "2024-12-12", + "2024-12-26", + "2025-01-09", + "2025-02-06", + "2025-02-20", + "2025-03-06", + "2025-03-20", + "2025-04-03", + "2025-04-17", + "2025-05-01", + "2025-05-15", + "2025-05-29", + "2025-06-12", + "2025-06-26", + "2025-07-10", + "2025-07-24", + "2025-08-07", + "2025-08-21", + "2025-09-04", + "2025-09-18" + ] + }, + "bin-calendar-wednesday-a": { + "Black Bin": [ + "2024-10-09", + "2024-10-23", + "2024-11-06", + "2024-11-20", + "2024-12-04", + "2024-12-18", + "2025-01-01", + "2025-01-15", + "2025-01-29", + "2025-02-12", + "2025-02-26", + "2025-03-12", + "2025-03-26", + "2025-04-09", + "2025-04-23", + "2025-05-07", + "2025-05-21", + "2025-06-04", + "2025-06-18", + "2025-07-02", + "2025-07-16", + "2025-07-30", + "2025-08-13", + "2025-08-27", + "2025-09-10", + "2025-09-24" + ], + "Brown Bin": [ + "2024-10-02", + "2024-10-16", + "2024-10-30", + "2024-11-13", + "2024-11-27", + "2024-12-11", + "2024-12-25", + "2025-01-08", + "2025-01-22", + "2025-02-05", + "2025-02-19", + "2025-03-05", + "2025-03-19", + "2025-04-02", + "2025-04-16", + "2025-04-30", + "2025-05-14", + "2025-05-28", + "2025-06-11", + "2025-06-25", + "2025-07-09", + "2025-07-23", + "2025-08-06", + "2025-08-20", + "2025-09-03", + "2025-09-17" + ], + "Green Bin": [ + "2024-10-02", + "2024-10-16", + "2024-10-30", + "2024-11-13", + "2024-11-27", + "2024-12-11", + "2024-12-25", + "2025-01-08", + "2025-02-05", + "2025-02-19", + "2025-03-05", + "2025-03-19", + "2025-04-02", + "2025-04-16", + "2025-04-30", + "2025-05-14", + "2025-05-28", + "2025-06-11", + "2025-06-25", + "2025-07-09", + "2025-07-23", + "2025-08-06", + "2025-08-20", + "2025-09-03", + "2025-09-17" + ] + }, + "bin-calendar-tuesday-a": { + "Black Bin": [ + "2024-10-08", + "2024-10-22", + "2024-11-05", + "2024-11-19", + "2024-12-03", + "2024-12-17", + "2024-12-31", + "2025-01-14", + "2025-01-28", + "2025-02-11", + "2025-02-25", + "2025-03-11", + "2025-03-25", + "2025-04-08", + "2025-04-22", + "2025-05-06", + "2025-05-20", + "2025-06-03", + "2025-06-17", + "2025-07-01", + "2025-07-15", + "2025-07-29", + "2025-08-12", + "2025-08-26", + "2025-09-09", + "2025-09-23" + ], + "Brown Bin": [ + "2024-10-01", + "2024-10-15", + "2024-10-29", + "2024-11-12", + "2024-11-26", + "2024-12-10", + "2024-12-24", + "2025-01-07", + "2025-01-21", + "2025-02-04", + "2025-02-18", + "2025-03-04", + "2025-03-18", + "2025-04-01", + "2025-04-15", + "2025-04-29", + "2025-05-13", + "2025-05-27", + "2025-06-10", + "2025-06-24", + "2025-07-08", + "2025-07-22", + "2025-08-05", + "2025-08-19", + "2025-09-02", + "2025-09-16", + "2025-09-30" + ], + "Green Bin": [ + "2024-10-01", + "2024-10-15", + "2024-10-29", + "2024-11-12", + "2024-11-26", + "2024-12-10", + "2024-12-24", + "2025-01-07", + "2025-02-04", + "2025-02-18", + "2025-03-04", + "2025-03-18", + "2025-04-01", + "2025-04-15", + "2025-04-29", + "2025-05-13", + "2025-05-27", + "2025-06-10", + "2025-06-24", + "2025-07-08", + "2025-07-22", + "2025-08-05", + "2025-08-19", + "2025-09-02", + "2025-09-16", + "2025-09-30" + ] + }, + "bin-calendar-monday-a": { + "Black Bin": [ + "2024-10-07", + "2024-10-21", + "2024-11-04", + "2024-11-18", + "2024-12-02", + "2024-12-16", + "2024-12-30", + "2025-01-13", + "2025-01-27", + "2025-02-10", + "2025-02-24", + "2025-03-10", + "2025-03-24", + "2025-04-07", + "2025-04-21", + "2025-05-05", + "2025-05-19", + "2025-06-02", + "2025-06-16", + "2025-06-30", + "2025-07-14", + "2025-07-28", + "2025-08-11", + "2025-08-25", + "2025-09-08", + "2025-09-22" + ], + "Brown Bin": [ + "2024-10-14", + "2024-10-28", + "2024-11-11", + "2024-11-25", + "2024-12-09", + "2024-12-23", + "2025-01-06", + "2025-01-20", + "2025-02-03", + "2025-02-17", + "2025-03-03", + "2025-03-17", + "2025-03-31", + "2025-04-14", + "2025-04-28", + "2025-05-12", + "2025-05-26", + "2025-06-09", + "2025-06-23", + "2025-07-07", + "2025-07-21", + "2025-08-04", + "2025-08-18", + "2025-09-01", + "2025-09-15" + ], + "Green Bin": [ + "2024-10-14", + "2024-10-28", + "2024-11-11", + "2024-11-25", + "2024-12-09", + "2024-12-23", + "2025-01-06", + "2025-02-03", + "2025-02-17", + "2025-03-03", + "2025-03-17", + "2025-03-31", + "2025-04-14", + "2025-04-28", + "2025-05-12", + "2025-05-26", + "2025-06-09", + "2025-06-23", + "2025-07-07", + "2025-07-21", + "2025-08-04", + "2025-08-18", + "2025-09-01", + "2025-09-15" + ] + } +} + + output = bin_data[filename] + else: + print(bin_day_response.content) + Exception("Bin data Download link not found.") + + else: + Exception("Failed to retrieve bin data.") + + return output From dde4170e9bb8cf78ed529202fe77dc9079f7ac6b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 7 Nov 2024 23:21:36 +0000 Subject: [PATCH 3/8] =?UTF-8?q?bump:=20version=200.112.0=20=E2=86=92=200.1?= =?UTF-8?q?12.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 6 ++++++ custom_components/uk_bin_collection/config_flow.py | 2 +- custom_components/uk_bin_collection/manifest.json | 4 ++-- pyproject.toml | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e4d2f0b770..29b475548a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,10 @@ ======= +## 0.112.1 (2024-11-07) + +### Fix + +- #767 BREAKING CHANGE - READD your sensors / config + ## 0.112.0 (2024-11-06) ### Feat diff --git a/custom_components/uk_bin_collection/config_flow.py b/custom_components/uk_bin_collection/config_flow.py index 1e74d37314..6fc48b62eb 100644 --- a/custom_components/uk_bin_collection/config_flow.py +++ b/custom_components/uk_bin_collection/config_flow.py @@ -219,7 +219,7 @@ async def async_step_reconfigure_confirm( async def get_councils_json(self) -> Dict[str, Any]: """Fetch and return the supported councils data.""" - url = "https://raw.githubusercontent.com/robbrad/UKBinCollectionData/0.112.0/uk_bin_collection/tests/input.json" + url = "https://raw.githubusercontent.com/robbrad/UKBinCollectionData/0.112.1/uk_bin_collection/tests/input.json" try: async with aiohttp.ClientSession() as session: async with session.get(url) as response: diff --git a/custom_components/uk_bin_collection/manifest.json b/custom_components/uk_bin_collection/manifest.json index 1d8b993630..cc98c17467 100644 --- a/custom_components/uk_bin_collection/manifest.json +++ b/custom_components/uk_bin_collection/manifest.json @@ -9,7 +9,7 @@ "integration_type": "service", "iot_class": "cloud_polling", "issue_tracker": "https://github.com/robbrad/UKBinCollectionData/issues", - "requirements": ["uk-bin-collection>=0.112.0"], - "version": "0.112.0", + "requirements": ["uk-bin-collection>=0.112.1"], + "version": "0.112.1", "zeroconf": [] } diff --git a/pyproject.toml b/pyproject.toml index eea0fa8ba2..70ed2af0b1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "uk_bin_collection" -version = "0.112.0" +version = "0.112.1" description = "Python Lib to collect UK Bin Data" readme = "README.md" authors = ["Robert Bradley "] From 51b61d50662d07c41c14358a00013b4ce54f3718 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 7 Nov 2024 23:54:18 +0000 Subject: [PATCH 4/8] =?UTF-8?q?bump:=20version=200.112.1=20=E2=86=92=200.1?= =?UTF-8?q?13.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 6 ++++++ custom_components/uk_bin_collection/config_flow.py | 2 +- custom_components/uk_bin_collection/manifest.json | 4 ++-- pyproject.toml | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 29b475548a..8e99375c65 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,10 @@ ======= +## 0.113.0 (2024-11-07) + +### Feat + +- adding calendar for Bins in Custom Component + ## 0.112.1 (2024-11-07) ### Fix diff --git a/custom_components/uk_bin_collection/config_flow.py b/custom_components/uk_bin_collection/config_flow.py index 6fc48b62eb..a550fce614 100644 --- a/custom_components/uk_bin_collection/config_flow.py +++ b/custom_components/uk_bin_collection/config_flow.py @@ -219,7 +219,7 @@ async def async_step_reconfigure_confirm( async def get_councils_json(self) -> Dict[str, Any]: """Fetch and return the supported councils data.""" - url = "https://raw.githubusercontent.com/robbrad/UKBinCollectionData/0.112.1/uk_bin_collection/tests/input.json" + url = "https://raw.githubusercontent.com/robbrad/UKBinCollectionData/0.113.0/uk_bin_collection/tests/input.json" try: async with aiohttp.ClientSession() as session: async with session.get(url) as response: diff --git a/custom_components/uk_bin_collection/manifest.json b/custom_components/uk_bin_collection/manifest.json index 61d586e88a..960aa6d1f1 100644 --- a/custom_components/uk_bin_collection/manifest.json +++ b/custom_components/uk_bin_collection/manifest.json @@ -9,8 +9,8 @@ "integration_type": "service", "iot_class": "cloud_polling", "issue_tracker": "https://github.com/robbrad/UKBinCollectionData/issues", - "requirements": ["uk-bin-collection>=0.112.1"], - "version": "0.112.1", + "requirements": ["uk-bin-collection>=0.113.0"], + "version": "0.113.0", "zeroconf": [], "platforms": ["sensor", "calendar"] } diff --git a/pyproject.toml b/pyproject.toml index 70ed2af0b1..362465952f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "uk_bin_collection" -version = "0.112.1" +version = "0.113.0" description = "Python Lib to collect UK Bin Data" readme = "README.md" authors = ["Robert Bradley "] From 146f33a28cb07511b0067e275d6fefa501c51ee5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 7 Nov 2024 23:58:10 +0000 Subject: [PATCH 5/8] =?UTF-8?q?bump:=20version=200.113.0=20=E2=86=92=200.1?= =?UTF-8?q?14.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 6 ++++++ custom_components/uk_bin_collection/config_flow.py | 2 +- custom_components/uk_bin_collection/manifest.json | 4 ++-- pyproject.toml | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e99375c65..313107a627 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,10 @@ ======= +## 0.114.0 (2024-11-07) + +### Feat + +- Nuneaton and Bedworth Borough Council + ## 0.113.0 (2024-11-07) ### Feat diff --git a/custom_components/uk_bin_collection/config_flow.py b/custom_components/uk_bin_collection/config_flow.py index a550fce614..a5a69c947d 100644 --- a/custom_components/uk_bin_collection/config_flow.py +++ b/custom_components/uk_bin_collection/config_flow.py @@ -219,7 +219,7 @@ async def async_step_reconfigure_confirm( async def get_councils_json(self) -> Dict[str, Any]: """Fetch and return the supported councils data.""" - url = "https://raw.githubusercontent.com/robbrad/UKBinCollectionData/0.113.0/uk_bin_collection/tests/input.json" + url = "https://raw.githubusercontent.com/robbrad/UKBinCollectionData/0.114.0/uk_bin_collection/tests/input.json" try: async with aiohttp.ClientSession() as session: async with session.get(url) as response: diff --git a/custom_components/uk_bin_collection/manifest.json b/custom_components/uk_bin_collection/manifest.json index 960aa6d1f1..0480d53c30 100644 --- a/custom_components/uk_bin_collection/manifest.json +++ b/custom_components/uk_bin_collection/manifest.json @@ -9,8 +9,8 @@ "integration_type": "service", "iot_class": "cloud_polling", "issue_tracker": "https://github.com/robbrad/UKBinCollectionData/issues", - "requirements": ["uk-bin-collection>=0.113.0"], - "version": "0.113.0", + "requirements": ["uk-bin-collection>=0.114.0"], + "version": "0.114.0", "zeroconf": [], "platforms": ["sensor", "calendar"] } diff --git a/pyproject.toml b/pyproject.toml index 362465952f..1a3dfb245c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "uk_bin_collection" -version = "0.113.0" +version = "0.114.0" description = "Python Lib to collect UK Bin Data" readme = "README.md" authors = ["Robert Bradley "] From cab432a856bd170ee23721d322d559812dc35aaa Mon Sep 17 00:00:00 2001 From: Robert Bradley Date: Fri, 8 Nov 2024 00:00:56 +0000 Subject: [PATCH 6/8] fix: Update manifest.json --- custom_components/uk_bin_collection/manifest.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/custom_components/uk_bin_collection/manifest.json b/custom_components/uk_bin_collection/manifest.json index 0480d53c30..9586d66c04 100644 --- a/custom_components/uk_bin_collection/manifest.json +++ b/custom_components/uk_bin_collection/manifest.json @@ -11,6 +11,5 @@ "issue_tracker": "https://github.com/robbrad/UKBinCollectionData/issues", "requirements": ["uk-bin-collection>=0.114.0"], "version": "0.114.0", - "zeroconf": [], - "platforms": ["sensor", "calendar"] + "zeroconf": [] } From 995ec9673107c6ac333b12ec3510fd8d071adb21 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 8 Nov 2024 00:02:17 +0000 Subject: [PATCH 7/8] =?UTF-8?q?bump:=20version=200.114.0=20=E2=86=92=200.1?= =?UTF-8?q?14.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 6 ++++++ custom_components/uk_bin_collection/config_flow.py | 2 +- custom_components/uk_bin_collection/manifest.json | 4 ++-- pyproject.toml | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 313107a627..9c4be74813 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,10 @@ ======= +## 0.114.1 (2024-11-08) + +### Fix + +- Update manifest.json + ## 0.114.0 (2024-11-07) ### Feat diff --git a/custom_components/uk_bin_collection/config_flow.py b/custom_components/uk_bin_collection/config_flow.py index a5a69c947d..b57174ba1a 100644 --- a/custom_components/uk_bin_collection/config_flow.py +++ b/custom_components/uk_bin_collection/config_flow.py @@ -219,7 +219,7 @@ async def async_step_reconfigure_confirm( async def get_councils_json(self) -> Dict[str, Any]: """Fetch and return the supported councils data.""" - url = "https://raw.githubusercontent.com/robbrad/UKBinCollectionData/0.114.0/uk_bin_collection/tests/input.json" + url = "https://raw.githubusercontent.com/robbrad/UKBinCollectionData/0.114.1/uk_bin_collection/tests/input.json" try: async with aiohttp.ClientSession() as session: async with session.get(url) as response: diff --git a/custom_components/uk_bin_collection/manifest.json b/custom_components/uk_bin_collection/manifest.json index 9586d66c04..85e0d3163e 100644 --- a/custom_components/uk_bin_collection/manifest.json +++ b/custom_components/uk_bin_collection/manifest.json @@ -9,7 +9,7 @@ "integration_type": "service", "iot_class": "cloud_polling", "issue_tracker": "https://github.com/robbrad/UKBinCollectionData/issues", - "requirements": ["uk-bin-collection>=0.114.0"], - "version": "0.114.0", + "requirements": ["uk-bin-collection>=0.114.1"], + "version": "0.114.1", "zeroconf": [] } diff --git a/pyproject.toml b/pyproject.toml index 1a3dfb245c..977643c383 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "uk_bin_collection" -version = "0.114.0" +version = "0.114.1" description = "Python Lib to collect UK Bin Data" readme = "README.md" authors = ["Robert Bradley "] From d57a1630116ed1b44539de565f7ed7bfa3e468bc Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 8 Nov 2024 06:46:59 +0000 Subject: [PATCH 8/8] =?UTF-8?q?bump:=20version=200.114.1=20=E2=86=92=200.1?= =?UTF-8?q?14.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 7 +++++++ custom_components/uk_bin_collection/config_flow.py | 2 +- custom_components/uk_bin_collection/manifest.json | 4 ++-- pyproject.toml | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c4be74813..4bd0378c5c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,11 @@ ======= +## 0.114.2 (2024-11-08) + +### Fix + +- #975 adding routine to handle migration error +- #975 adding routine to handle migration error + ## 0.114.1 (2024-11-08) ### Fix diff --git a/custom_components/uk_bin_collection/config_flow.py b/custom_components/uk_bin_collection/config_flow.py index b57174ba1a..fa43ca0bbc 100644 --- a/custom_components/uk_bin_collection/config_flow.py +++ b/custom_components/uk_bin_collection/config_flow.py @@ -219,7 +219,7 @@ async def async_step_reconfigure_confirm( async def get_councils_json(self) -> Dict[str, Any]: """Fetch and return the supported councils data.""" - url = "https://raw.githubusercontent.com/robbrad/UKBinCollectionData/0.114.1/uk_bin_collection/tests/input.json" + url = "https://raw.githubusercontent.com/robbrad/UKBinCollectionData/0.114.2/uk_bin_collection/tests/input.json" try: async with aiohttp.ClientSession() as session: async with session.get(url) as response: diff --git a/custom_components/uk_bin_collection/manifest.json b/custom_components/uk_bin_collection/manifest.json index 85e0d3163e..f771342d3a 100644 --- a/custom_components/uk_bin_collection/manifest.json +++ b/custom_components/uk_bin_collection/manifest.json @@ -9,7 +9,7 @@ "integration_type": "service", "iot_class": "cloud_polling", "issue_tracker": "https://github.com/robbrad/UKBinCollectionData/issues", - "requirements": ["uk-bin-collection>=0.114.1"], - "version": "0.114.1", + "requirements": ["uk-bin-collection>=0.114.2"], + "version": "0.114.2", "zeroconf": [] } diff --git a/pyproject.toml b/pyproject.toml index 977643c383..566e654e3e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "uk_bin_collection" -version = "0.114.1" +version = "0.114.2" description = "Python Lib to collect UK Bin Data" readme = "README.md" authors = ["Robert Bradley "]