Install ESPHome brand, error: Config flow could not be loaded

I have been running Home Assistant Core on Ubuntu in a VMware environment. Now, I’m ready to install it on an RPI with Ubuntu.

I installed HA on the RPI the same way as in the VMware setup and copied the YAML files. Almost everything seems to be working, except for the ESPHome devices. So, I tried installing ESPHome via Integrations, but I got the following error:

Config flow could not be loaded: Failed dependencies bluetooth

When I disable default_config:, the Bluetooth error disappears from the log, but I still get the same error. “Config flow could not be loaded: Failed dependencies bluetooth”

I have no idea how to fix this. Does anyone know in which direction I should look?

Here is part of the log after starting Home Assistant:

2025-03-07 19:53:09.224 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2025-03-07 19:53:16.633 ERROR (ImportExecutor_0) [homeassistant.loader] Unexpected exception importing component homeassistant.components.bluetooth
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.13/site-packages/homeassistant/loader.py”, line 1075, in _get_component
ComponentProtocol, importlib.import_module(self.pkg_path)
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
File “/srv/homeassistant/lib/python3.13/site-packages/homeassistant/util/loop.py”, line 200, in protected_loop_func
return func(*args, **kwargs)
File “/usr/lib/python3.13/importlib/init.py”, line 88, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “”, line 1387, in _gcd_import
File “”, line 1360, in _find_and_load
File “”, line 1331, in _find_and_load_unlocked
File “”, line 935, in _load_unlocked
File “”, line 1026, in exec_module
File “”, line 488, in _call_with_frames_removed
File “/srv/homeassistant/lib/python3.13/site-packages/homeassistant/components/bluetooth/init.py”, line 27, in
from habluetooth import (
…<8 lines>…
)
File “/srv/homeassistant/lib/python3.13/site-packages/habluetooth/init.py”, line 3, in
from .advertisement_tracker import (
…<2 lines>…
)
File “src/habluetooth/advertisement_tracker.py”, line 1, in init habluetooth.advertisement_tracker
AttributeError: module ‘habluetooth.models’ has no attribute ‘pyx_capi
2025-03-07 19:53:16.670 ERROR (MainThread) [homeassistant.loader] Unexpected exception importing component homeassistant.components.bluetooth
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.13/site-packages/homeassistant/loader.py”, line 1075, in _get_component
ComponentProtocol, importlib.import_module(self.pkg_path)
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^

There a problem loading your bluetooth device.
I dont use VM so cant help with details but start looking at that.

look here
may be related

Thx, I had alread disable BT in the PI.

dtoverlay=pi3-disable-bt

And habluetooth is not installed.

pip3 uninstall habluetooth
WARNING: Skipping habluetooth as it is not installed.

Or I need to install ESPHome dedicated also on the RPI?

O and the VM works fine, I have this error on the fresh install on the RPI 3B+

Something in HA is still wanting bluetooth

I don’t believe this is esphome related

I have now also still install (the program) esphome but this not solve it

2025-03-07 22:02:10.698 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of ‘esphome’. Setup failed for dependencies: [‘bluetooth’]

ERROR (ImportExecutor_0) [homeassistant.loader] Unexpected exception importing component homeassistant.components.bluetooth

I thinkt the solution was/is

Disable BT on the RPI and than remove (not reinstall) HA and install a fresh one

After done this, I (or the uninstaller) was forget to delete de yaml file. So it was not needed to recover with a backup.

I have no other clue…

so you got it fixed or still have issue?