Skip to content

Commit

Permalink
config_flow fetching source returns unstripped waste types
Browse files Browse the repository at this point in the history
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
  • Loading branch information
5ila5 committed Jul 26, 2024
1 parent 7dd10b2 commit 0b37e7e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/waste_collection_schedule/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0b37e7e

Please sign in to comment.