History Stats unavailable, "Error during setup of component recorder: 'recorder'"

Good day,

I’m experiencing the following error:

2025-02-24 09:34:32.483 ERROR (MainThread) [homeassistant.setup] Error during setup of component recorder: 'recorder'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 422, in _async_setup_component
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/recorder/__init__.py", line 162, in async_setup
    instance = hass.data[DATA_INSTANCE] = Recorder(
                                          ~~~~~~~~^
        hass=hass,
        ^^^^^^^^^^
    ...<8 lines>...
        exclude_event_types=exclude_event_types,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/src/homeassistant/homeassistant/components/recorder/core.py", line 186, in __init__
    db_connected: asyncio.Future[bool] = hass.data[DOMAIN].db_connected
                                         ~~~~~~~~~^^^^^^^^
KeyError: 'recorder'
2025-02-24 09:34:32.485 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of 'history_stats'. Setup failed for dependencies: ['recorder']

Surrounding logs show nothing in relation to this. Startup and functionality of HASS is normal, however there is no history for any entities.

I’ve removed the DB, and it recreated successfully - so corruption is ruled out.

This is the only other post I’ve seen referencing this error.

TIA!

Hello Daniel Vorster,

I believe it is telling you you have not set up this integration.

@Sir_Goodenough nail on the head - the issue was between the keyboard and the chair.

I disabled the “default_config”, and completely forgot to re-enable.

Thank you!

1 Like