Skip to content

Commit

Permalink
Reload only when update & add task name
Browse files Browse the repository at this point in the history
  • Loading branch information
jpbede committed Jan 15, 2024
1 parent b64561c commit e57eddd
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions homeassistant/config_entries.py
Original file line number Diff line number Diff line change
Expand Up @@ -1947,15 +1947,17 @@ def async_update_and_reload_entry(
reason: str = "reauth_successful",
) -> data_entry_flow.FlowResult:
"""Update config entry, reload config entry and finish config flow."""
self.hass.config_entries.async_update_entry(
result = self.hass.config_entries.async_update_entry(
entry=entry,
title=title,
data=data,
options=options,
)
self.hass.async_create_task(
self.hass.config_entries.async_reload(entry.entry_id)
)
if result:
self.hass.async_create_task(
self.hass.config_entries.async_reload(entry.entry_id),
f"config entry reload {entry.title} {entry.domain} {entry.entry_id}",
)
return self.async_abort(reason=reason)


Expand Down

0 comments on commit e57eddd

Please sign in to comment.