HEOS Configuration flow is already in progress

I am seeing the following error message in home-assistant.log:

2025-03-06 09:54:21.349 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/discovery_flow.py", line 137, in _async_start
    await gather_with_limited_concurrency(FLOW_INIT_LIMIT, *init_coros)
  File "/usr/src/homeassistant/homeassistant/util/async_.py", line 114, in gather_with_limited_concurrency
    return await gather(
           ^^^^^^^^^^^^^
    ...<2 lines>...
    )
    ^
  File "/usr/src/homeassistant/homeassistant/util/async_.py", line 112, in sem_task
    return await task
           ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1457, in async_init
    flow, result = await self._async_init(flow_id, handler, context, data)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1492, in _async_init
    result = await self._async_handle_step(flow, flow.init_step, data)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 490, in _async_handle_step
    result: _FlowResultT = await getattr(flow, method)(user_input)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/heos/config_flow.py", line 145, in async_step_ssdp
    if entry and hostname in _get_current_hosts(entry):
                             ~~~~~~~~~~~~~~~~~~^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/heos/config_flow.py", line 107, in _get_current_hosts
    hosts = set(entry.data[CONF_HOST])
                ~~~~~~~~~~^^^^^^^^^^^
KeyError: 'host'

I noticed that the last two lines of the traceback mention heos. I figured out that heos is related to Denon products. I have a Denon AVR on my network. I might have tried to integrate the AVR a long time ago, but it does not show up in Integrations. If I try to integrate it now, I get a popup with the message “Configuration flow is already in progress”. How do I fix this problem?

Weird running into this myself, I couldnt get the HEOS plugin to show the correct updated I.P for my receiver and there was no option to override it and I ended up sarting the integration setup process in 2 tabs at the same time which put HA into this state.

Restarting HA has not fixed the issue.

Also, the error message refers to a problem with this file:

/usr/src/homeassistant/homeassistant/components/heos/config_flow.py

However, the directory /usr does not have a subdirectory src, nor can I find a directory called heos when I do a find from /. What is going on here?

I logged this as an issue at HEOS error in log, and cannot install integration either · Issue #140079 · home-assistant/core · GitHub

Hi Folks,

Sorry for the confusion and inconvenience. There were actually two issues here, both of which will be resolved in 2025.3.2.

The fist issue is related to the key error. If you had previously ignored your discovered HEOS system, the error above is logged at startup (or whenever a new HEOS device is discovered), and you’ll be unable to add the integration manually. If you don’t plan on using HEOS, you can simply ignore the logged error meanwhile. If you’d like to add the integration, first you need to “stop ignoring” HEOS, restart HA, then add it via discovery.

There’s a second issue related to receiving the message, “flow already in progress”, when trying to add the integration manually when discovery is waiting to be confirmed. To workaround this, first confirm the discovered HEOS system to add it to HA. You can then change the host it uses to connect via the Reconfigure option, or if you wish, remove it and add it back manually.

Hope this helps! Again both of these issues will be resolved in 2025.3.2.

Let me know if you have any further questions!

Thanks,
Andy