From db06cd0e610c2bdfae65abe900fcdba73565f358 Mon Sep 17 00:00:00 2001 From: Robert Marsal <507871+robertmarsal@users.noreply.github.com> Date: Thu, 26 Dec 2024 23:09:48 +0000 Subject: [PATCH] fix: Merton UK has changed the format of the dates (#3290) * fix: Merton UK has changed the format of the dates Also updated the test cases as they don't seem to be valid IDs any more. * reformatting + fixing old typo --------- Co-authored-by: 5ila5 <5ila5@users.noreply.github.com> --- .../waste_collection_schedule/source/merton_gov_uk.py | 6 +++--- doc/source/merton_gov_uk.md | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/custom_components/waste_collection_schedule/waste_collection_schedule/source/merton_gov_uk.py b/custom_components/waste_collection_schedule/waste_collection_schedule/source/merton_gov_uk.py index 263a2ed5b..1a7d4c5d3 100644 --- a/custom_components/waste_collection_schedule/waste_collection_schedule/source/merton_gov_uk.py +++ b/custom_components/waste_collection_schedule/waste_collection_schedule/source/merton_gov_uk.py @@ -11,8 +11,8 @@ URL = "https://www.merton.gov.uk/" TEST_CASES = { - "test 1": {"property": "28186366"}, - "test 2": {"property": "28166100"}, + "test 1": {"property": "25884617"}, + "test 2": {"property": "25861170"}, } API_URL = "https://myneighbourhood.merton.gov.uk/Wasteservices/WasteServices.aspx" @@ -66,7 +66,7 @@ def fetch(self): # Add data to the main JSON Wrapper entries.append( Collection( - date=datetime.strptime(collectionDate, "%d %B %Y").date(), + date=datetime.strptime(collectionDate, "%A %d %B %Y").date(), t=title, icon=ICON_MAP.get(title), ) diff --git a/doc/source/merton_gov_uk.md b/doc/source/merton_gov_uk.md index e128cdaca..e9324577b 100644 --- a/doc/source/merton_gov_uk.md +++ b/doc/source/merton_gov_uk.md @@ -21,7 +21,7 @@ Unique number the London Borough of Merton uses to identify your property. #### How to find your `PROPERTY_ID` -Serach for your waste collection schedule at (https://myneighbourhood.merton.gov.uk/Wasteservices/WasteServicesSearch.aspx). Your `PROPERTY_ID` is the set of numbers at the end of the url when your schedule is being displayed. +Search for your waste collection schedule at (https://myneighbourhood.merton.gov.uk/Wasteservices/WasteServicesSearch.aspx). Your `PROPERTY_ID` is the set of numbers at the end of the url when your schedule is being displayed. For example: myneighbourhood.merton.gov.uk/Wasteservices/WasteServices.aspx?ID=`28166109`