Skip to content

Commit

Permalink
Check if host/port changes in reconfigure flow
Browse files Browse the repository at this point in the history
  • Loading branch information
WillCodeForCats committed Jan 20, 2025
1 parent 1d46ce4 commit d43495b
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions custom_components/solaredge_modbus_multi/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,13 @@ async def async_step_reconfigure(
)
this_unique_id = f"{user_input[CONF_HOST]}:{user_input[CONF_PORT]}"

self._async_abort_entries_match(
{"host": user_input[CONF_HOST], "port": user_input[CONF_PORT]}
)
if this_unique_id != config_entry.unique_id:
self._async_abort_entries_match(
{
"host": user_input[CONF_HOST],
"port": user_input[CONF_PORT],
}
)

return self.async_update_reload_and_abort(
config_entry,
Expand Down

0 comments on commit d43495b

Please sign in to comment.