From 0b37e7e3214289f6639dccd3e008f741c09a6ed8 Mon Sep 17 00:00:00 2001 From: 5ila5 <5ila5@users.noreply.github.com> Date: Fri, 26 Jul 2024 20:00:35 +0200 Subject: [PATCH] config_flow fetching source returns unstripped waste types but the source setup later will strip whitespaces at the start/end, Currently the suggested waste types may have a space at the end or beginning, while these will be removed later and the sensor does not match the type anymore --- custom_components/waste_collection_schedule/config_flow.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/waste_collection_schedule/config_flow.py b/custom_components/waste_collection_schedule/config_flow.py index 19c71c097..467485cd4 100644 --- a/custom_components/waste_collection_schedule/config_flow.py +++ b/custom_components/waste_collection_schedule/config_flow.py @@ -536,7 +536,7 @@ async def __validate_args_user_input( if len(resp) == 0: errors["base"] = "fetch_empty" - self._fetched_types = list({x.type for x in resp}) + self._fetched_types = list({x.type.strip() for x in resp}) except Exception as e: errors["base"] = "fetch_error" description_placeholders["fetch_error_message"] = str(e)