Skip to content

Commit

Permalink
fix unable to setup new sensor if start is the same #5
Browse files Browse the repository at this point in the history
  • Loading branch information
FaserF committed Oct 18, 2022
1 parent 2d123c6 commit 784b91b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/deutschebahn/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ async def async_step_user(self, user_input=None):
errors = {}

if user_input is not None:
await self.async_set_unique_id(user_input[CONF_START])
await self.async_set_unique_id(user_input[CONF_START] + " to " + user_input[CONF_DESTINATION])
self._abort_if_unique_id_configured()
return self.async_create_entry(title=user_input[CONF_START] + "-" + user_input[CONF_DESTINATION], data=user_input)
return self.async_create_entry(title=user_input[CONF_START] + " - " + user_input[CONF_DESTINATION], data=user_input)

_LOGGER.debug(
"Initialized new deutschebahn with id: {unique_id}"
Expand Down

0 comments on commit 784b91b

Please sign in to comment.