mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
Allow to reconfigure integrations with single_config_entry
set (#117939)
This commit is contained in:
parent
cc17725d1d
commit
88257c9c42
@ -1231,7 +1231,8 @@ class ConfigEntriesFlowManager(data_entry_flow.FlowManager[ConfigFlowResult]):
|
||||
# Avoid starting a config flow on an integration that only supports
|
||||
# a single config entry, but which already has an entry
|
||||
if (
|
||||
context.get("source") not in {SOURCE_IGNORE, SOURCE_REAUTH, SOURCE_UNIGNORE}
|
||||
context.get("source")
|
||||
not in {SOURCE_IGNORE, SOURCE_REAUTH, SOURCE_UNIGNORE, SOURCE_RECONFIGURE}
|
||||
and self.config_entries.async_has_entries(handler, include_ignore=False)
|
||||
and await _support_single_config_entry_only(self.hass, handler)
|
||||
):
|
||||
|
@ -5027,6 +5027,11 @@ async def test_hashable_non_string_unique_id(
|
||||
None,
|
||||
{"type": data_entry_flow.FlowResultType.FORM, "step_id": "reauth_confirm"},
|
||||
),
|
||||
(
|
||||
config_entries.SOURCE_RECONFIGURE,
|
||||
None,
|
||||
{"type": data_entry_flow.FlowResultType.FORM, "step_id": "reauth_confirm"},
|
||||
),
|
||||
(
|
||||
config_entries.SOURCE_UNIGNORE,
|
||||
None,
|
||||
@ -5111,6 +5116,11 @@ async def test_starting_config_flow_on_single_config_entry(
|
||||
None,
|
||||
{"type": data_entry_flow.FlowResultType.FORM, "step_id": "reauth_confirm"},
|
||||
),
|
||||
(
|
||||
config_entries.SOURCE_RECONFIGURE,
|
||||
None,
|
||||
{"type": data_entry_flow.FlowResultType.FORM, "step_id": "reauth_confirm"},
|
||||
),
|
||||
(
|
||||
config_entries.SOURCE_UNIGNORE,
|
||||
None,
|
||||
|
Loading…
x
Reference in New Issue
Block a user