From 84fd83c758570054955787a8ff86e3e720eeb1f0 Mon Sep 17 00:00:00 2001 From: 5ila5 <5ila5@users.noreply.github.com> Date: Mon, 4 Sep 2023 14:59:58 +0200 Subject: [PATCH] recyclecoach fix: no longer displays moved events --- .../waste_collection_schedule/source/recyclecoach_com.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/custom_components/waste_collection_schedule/waste_collection_schedule/source/recyclecoach_com.py b/custom_components/waste_collection_schedule/waste_collection_schedule/source/recyclecoach_com.py index 9f5f1aa5..dafc14cf 100644 --- a/custom_components/waste_collection_schedule/waste_collection_schedule/source/recyclecoach_com.py +++ b/custom_components/waste_collection_schedule/waste_collection_schedule/source/recyclecoach_com.py @@ -174,6 +174,8 @@ class Source: for month in year["months"]: for event in month["events"]: for collection in event["collections"]: + if collection["status"] == "is_none": + continue ct = collection_types["collection-" + str(collection["id"])] c = Collection( datetime.strptime(event["date"], date_format).date(), @@ -181,5 +183,4 @@ class Source: ICON_MAP.get(ct["title"]), ) entries.append(c) - return entries