Skip to content

Commit

Permalink
Migrate unifi to use async_update_reload_and_abort (#110987)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco committed Feb 20, 2024
1 parent 059e1fb commit 8927769
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions homeassistant/components/unifi/config_flow.py
Expand Up @@ -167,11 +167,9 @@ async def async_step_site(
if controller and controller.available:
return self.async_abort(reason="already_configured")

self.hass.config_entries.async_update_entry(
config_entry, data=self.config
return self.async_update_reload_and_abort(
config_entry, data=self.config, reason=abort_reason
)
await self.hass.config_entries.async_reload(config_entry.entry_id)
return self.async_abort(reason=abort_reason)

site_nice_name = self.sites[unique_id].description
return self.async_create_entry(title=site_nice_name, data=self.config)
Expand Down

0 comments on commit 8927769

Please sign in to comment.