mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Ensure flux_led does not try to reload while setup is in progress (#86122)
There was a discovery race in flux_led that could trigger it to try to reload while in progress if the device data changed
This commit is contained in:
parent
cc74fcbda7
commit
b722a7e05b
@ -121,8 +121,12 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
|||||||
async_update_entry_from_discovery(
|
async_update_entry_from_discovery(
|
||||||
self.hass, entry, device, None, allow_update_mac
|
self.hass, entry, device, None, allow_update_mac
|
||||||
)
|
)
|
||||||
or entry.state == config_entries.ConfigEntryState.SETUP_RETRY
|
and entry.state
|
||||||
):
|
not in (
|
||||||
|
config_entries.ConfigEntryState.SETUP_IN_PROGRESS,
|
||||||
|
config_entries.ConfigEntryState.NOT_LOADED,
|
||||||
|
)
|
||||||
|
) or entry.state == config_entries.ConfigEntryState.SETUP_RETRY:
|
||||||
self.hass.async_create_task(
|
self.hass.async_create_task(
|
||||||
self.hass.config_entries.async_reload(entry.entry_id)
|
self.hass.config_entries.async_reload(entry.entry_id)
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user