mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 08:47:57 +00:00
Use new config entry update/abort helper in isy994 (#108678)
Use new config entry update/abort helper in isy994 uses the new helper from https://github.com/home-assistant/core/pull/108034
This commit is contained in:
parent
4378a171b2
commit
07926660bc
@ -276,10 +276,9 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
||||
except InvalidAuth:
|
||||
errors[CONF_PASSWORD] = "invalid_auth"
|
||||
else:
|
||||
cfg_entries = self.hass.config_entries
|
||||
cfg_entries.async_update_entry(existing_entry, data=new_data)
|
||||
await cfg_entries.async_reload(existing_entry.entry_id)
|
||||
return self.async_abort(reason="reauth_successful")
|
||||
return self.async_update_reload_and_abort(
|
||||
self._existing_entry, data=new_data
|
||||
)
|
||||
|
||||
self.context["title_placeholders"] = {
|
||||
CONF_NAME: existing_entry.title,
|
||||
|
@ -676,6 +676,7 @@ async def test_reauth(hass: HomeAssistant) -> None:
|
||||
CONF_PASSWORD: "test-password",
|
||||
},
|
||||
)
|
||||
await hass.async_block_till_done()
|
||||
|
||||
assert mock_setup_entry.called
|
||||
assert result4["type"] == "abort"
|
||||
|
Loading…
x
Reference in New Issue
Block a user