Skip to content

missing import homeassistant.components.onvif.event #1304

@Truble187

Description

@Truble187

Description

Hey,
since the last update I have issues to load the integration:

#1

Logger: custom_components.tapo_control
Source: config_entries.py:4097
Integration: tapo_control ([documentation](https://github.com/JurajNyiri/HomeAssistant-Tapo-Control), [issues](https://github.com/JurajNyiri/HomeAssistant-Tapo-Control/issues))
First occurred: 12:34:20 (2 occurrences)
Last logged: 12:34:54

Error occurred loading flow for integration tapo_control: No module named 'homeassistant.components.onvif.event'

#2

Log details (ERROR)
Logger: homeassistant.setup
Source: setup.py:343
First occurred: 11:06:09 (1 occurrence)
Last logged: 11:06:09

Setup failed for custom integration 'tapo_control': Unable to import component: No module named 'homeassistant.components.onvif.event'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 343, in _async_setup_component
    component = await integration.async_get_component()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1044, in async_get_component
    self._component_future.result()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1024, in async_get_component
    comp = await self.hass.async_add_import_executor_job(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        self._get_component, True
        ^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/local/lib/python3.14/concurrent/futures/thread.py", line 86, in run
    result = ctx.run(self.task)
  File "/usr/local/lib/python3.14/concurrent/futures/thread.py", line 73, in run
    return fn(*args, **kwargs)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1084, in _get_component
    ComponentProtocol, importlib.import_module(self.pkg_path)
                       ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/util/loop.py", line 201, in protected_loop_func
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.14/importlib/__init__.py", line 88, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1398, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1371, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1342, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 938, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 759, in exec_module
  File "<frozen importlib._bootstrap>", line 491, in _call_with_frames_removed
  File "/config/custom_components/tapo_control/__init__.py", line 55, in <module>
    from .utils import (
    ...<18 lines>...
    )
  File "/config/custom_components/tapo_control/utils.py", line 26, in <module>
    from homeassistant.components.onvif.event import EventManager
ModuleNotFoundError: No module named 'homeassistant.components.onvif.event'

Issue descripion from copilot:
The issue is caused by a compatibility problem between the Home Assistant version and the custom integration tapo_control.
The integration tries to import the EventManager from the internal module homeassistant.components.onvif.event, which is no longer available in newer Home Assistant versions. As a result, the integration fails to load during setup.

Reproduction Steps

See errorlogs in the descripion

Expected behavior

Integration should load successful

If applicable, add error logs.

#1
Logger: custom_components.tapo_control
Source: config_entries.py:4097
Integration: tapo_control (documentation, issues)
First occurred: 12:34:20 (2 occurrences)
Last logged: 12:34:54

Error occurred loading flow for integration tapo_control: No module named 'homeassistant.components.onvif.event'

#2
Log details (ERROR)
Logger: homeassistant.setup
Source: setup.py:343
First occurred: 11:06:09 (1 occurrence)
Last logged: 11:06:09

Setup failed for custom integration 'tapo_control': Unable to import component: No module named 'homeassistant.components.onvif.event'
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 343, in _async_setup_component
component = await integration.async_get_component()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 1044, in async_get_component
self._component_future.result()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 1024, in async_get_component
comp = await self.hass.async_add_import_executor_job(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
self._get_component, True
^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/usr/local/lib/python3.14/concurrent/futures/thread.py", line 86, in run
result = ctx.run(self.task)
File "/usr/local/lib/python3.14/concurrent/futures/thread.py", line 73, in run
return fn(*args, **kwargs)
File "/usr/src/homeassistant/homeassistant/loader.py", line 1084, in _get_component
ComponentProtocol, importlib.import_module(self.pkg_path)
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/util/loop.py", line 201, in protected_loop_func
return func(*args, **kwargs)
File "/usr/local/lib/python3.14/importlib/init.py", line 88, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1398, in _gcd_import
File "", line 1371, in _find_and_load
File "", line 1342, in _find_and_load_unlocked
File "", line 938, in _load_unlocked
File "", line 759, in exec_module
File "", line 491, in _call_with_frames_removed
File "/config/custom_components/tapo_control/init.py", line 55, in
from .utils import (
...<18 lines>...
)
File "/config/custom_components/tapo_control/utils.py", line 26, in
from homeassistant.components.onvif.event import EventManager
ModuleNotFoundError: No module named 'homeassistant.components.onvif.event'

Device Firmware

all

Integration Version

6.0.1

Last known working integration version

6.0.0

Using stream component

Yes

Does camera work via official integrations?

Yes

HASS Environment

Docker

Search for similar issues

Yes

Additional information

No response

Debug Logs (Required)

already done

Metadata

Metadata

Assignees

No one assigned

    Labels

    InvalidBug/Enhancement not related to integration or already available.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions