Problem to remove TRADFRI integration

Hi,
I have this environment: Raspberry Pi 3 B+ with HASSIO: core-2021.8.8, supervisor-2021.06.8 and Home Assistant OS 6.2

from core-2021.6.x I had error/warning on my TRADFRI integration…

I know TRADFRI integration if native in HA, but I found this folder /root/config/custom_components/tradfri/ in my installation…
but it don’t appear in HACS…

I don’t remember why…

After starting to get warning on wervion key of TRADFRI integration (I solved adding line version key in manifest.json), integration stop to work due a problem of no module aiocoap.credentials found; but I can’t solve this problem because I have HASSIO environment…

So, I would try to redo again TRADFRI integration to try to solve this problem: I gone in HA GUI to remove TRADFRI integration, but it don’t disappear from HA GUI!!!

I also tried to remove /root/config/custom_components/tradfri/, but this don’t solve…

HA official support say this isn’t a software bug, so they don’t give me support…

I also tried with pytradfri developer…no luck:

Anyone know howto remove TRADFRI integration from HA GUI?

Only integrations that were added through the GUI can be removed through the GUI. Check your configuration.yaml for any traces of tradfri.

I already double checked, but I didn’t found any tradfri entry in my configuration.yaml…there is any other place to check?

also removing tradfri from /root/config/custom_components/tradfri/ I alwasy receive error of module aiocoap.credentials not found…


Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
    resp = await self._request_handler(request)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_app.py", line 499, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_middlewares.py", line 119, in impl
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 77, in forwarded_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 24, in request_context_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 78, in ban_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 144, in auth_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 135, in handle
    result = await result
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 70, in delete
    result = await hass.config_entries.async_remove(entry_id)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 809, in async_remove
    await entry.async_remove(self.hass)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 467, in async_remove
    component = integration.get_component()
  File "/usr/src/homeassistant/homeassistant/loader.py", line 490, in get_component
    cache[self.domain] = importlib.import_module(self.pkg_path)
  File "/usr/local/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 855, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/usr/src/homeassistant/homeassistant/components/tradfri/__init__.py", line 6, in <module>
    from pytradfri.api.aiocoap_api import APIFactory
  File "/usr/local/lib/python3.9/site-packages/pytradfri/api/aiocoap_api.py", line 7, in <module>
    from aiocoap.credentials import CredentialsMissingError
ModuleNotFoundError: No module named 'aiocoap.credentials'

I also tried to do a check with pytradfri library, but I receive always same error (with right or wrong security code):

PROBLEM SOLVED:

  1. remove folder /root/config/custom_components/tradfri/
  2. upgrade Core version

it check integration active and remove TRADFRI from HA native integrations!

1 Like

I solved this issue only removing custom component folder from file system and upgrading Home Assistant OS…so I suppose during upgrading process there something checking custom componenents states.

So I would suggest to introduce a new feature in next release of HA, where during HA reboot it can check the state/folder of custom components!