marq24 / ha-goecharger-api2

HA integration for go-eCharger series (V3 and higher) & go-eController communicate via the HTTP API v2.0. Please note, that this integration is not official and not supported by the go-e developer team. This project is not affiliated with go-e.com in any way.
Apache License 2.0
40 stars 2 forks source link

Startup failure with 2024.11b0 #25

Closed IngmarStein closed 1 month ago

IngmarStein commented 1 month ago

Checklist

Add a description

The integration fails to start for me after upgrading to HA 2024.11b0 (see log output).

Add your DEBUG log output

Setup failed for custom integration 'goecharger_api2': Unable to import component: cannot import name 'Config' from 'homeassistant.core' (/usr/src/homeassistant/homeassistant/core.py)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1011, in async_get_component
    comp = await self.hass.async_add_import_executor_job(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1071, in _get_component
    ComponentProtocol, importlib.import_module(self.pkg_path)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/util/loop.py", line 200, in protected_loop_func
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 995, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/config/custom_components/goecharger_api2/__init__.py", line 11, in <module>
    from homeassistant.core import Config, Event, SupportsResponse
ImportError: cannot import name 'Config' from 'homeassistant.core' (/usr/src/homeassistant/homeassistant/core.py). Did you mean: 'config'?
marq24 commented 1 month ago

thanks for your report - please update to https://github.com/marq24/ha-goecharger-api2/releases/tag/2024.10.2 and close this issue when it's fixed

IngmarStein commented 1 month ago

That was quick! I can verify that the fix works and the integration is starting again.