diff --git a/custom_components/waste_collection_schedule/waste_collection_schedule/source/liverpool_gov_uk.py b/custom_components/waste_collection_schedule/waste_collection_schedule/source/liverpool_gov_uk.py index f00a465d5..0c0fc3470 100644 --- a/custom_components/waste_collection_schedule/waste_collection_schedule/source/liverpool_gov_uk.py +++ b/custom_components/waste_collection_schedule/waste_collection_schedule/source/liverpool_gov_uk.py @@ -54,10 +54,10 @@ def trimsuffix(s): date = today + timedelta(days=1) else: date = datetime.strptime(collectiondate, '%A, %d %B %Y').date() - - # As no year is specified we might need to add one year if it crosses Dec 31st - if date < today: - date.replace(year = today.year + 1) + # As no year is specified we might need to add one year if it crosses Dec 31st + if date.month == 1 and today.month == 12: + date = date.replace(year=date.year+1) + entries.append( Collection(