djtimca / haomnilogic

Hayward Omnilogic integration for Home Assistant available through HACS
Apache License 2.0
18 stars 6 forks source link

OmniLogic log error Invalid Config #57

Closed rob7419 closed 5 months ago

rob7419 commented 5 months ago

Upgraded to HA 2024.2.0 and on reboot the Omnilogic gave a notification that it failed to load.

Logger: homeassistant.setup Source: setup.py:251 First occurred: 6:16:03 PM (1 occurrences) Last logged: 6:16:03 PM

Setup failed for custom integration 'omnilogic': Unable to import component: No module named 'importlib_metadata' Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/setup.py", line 251, in _async_setup_component component = integration.get_component() ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/loader.py", line 827, in get_component ComponentProtocol, importlib.import_module(self.pkg_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/importlib/init.py", line 90, 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 994, in exec_module File "", line 488, in _call_with_frames_removed File "/config/custom_components/omnilogic/init.py", line 12, in from .common import OmniLogicUpdateCoordinator File "/config/custom_components/omnilogic/common.py", line 6, in from importlib_metadata import NullFinder ModuleNotFoundError: No module named 'importlib_metadata'

twillux commented 5 months ago

As a temporary workaround I commented out common.py line 6: from importlib_metadata import NullFinder

This allows the integration to successfully start with no observed issues so far. I’m not versed enough in HA python integrations to understand the full implications, but wanted to share this as a stop-gap while this issue is reviewed.

michaelstein60 commented 5 months ago

I am seeing the same error after upgrading HA to 2024.2.0

djtimca commented 5 months ago

New release 1.0.18 released with this fix. Should resolve the issue.