Skip to content

Commit

Permalink
Fix for #176
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinfrlch committed Jan 19, 2025
1 parent 345ac3b commit ea7f58d
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions custom_components/llmvision/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -469,10 +469,13 @@ async def async_step_semantic_index(self, user_input=None):
if user_input is not None:
user_input["provider"] = self.init_info["provider"]

for uid in self.hass.data[DOMAIN]:
if 'retention_time' in self.hass.data[DOMAIN][uid]:
self.async_abort(reason="already_configured")
# add the mode to user_input
try:
for uid in self.hass.data[DOMAIN]:
if 'retention_time' in self.hass.data[DOMAIN][uid]:
self.async_abort(reason="already_configured")
except KeyError:
# no existing configuration, continue
pass
if self.source == config_entries.SOURCE_RECONFIGURE:
# we're reconfiguring an existing config
return self.async_update_reload_and_abort(
Expand Down

0 comments on commit ea7f58d

Please sign in to comment.