littleyoda / ha-pysmaplus

home assistant custom integration for pysma-plus
28 stars 1 forks source link

Bug: Can't create integration #23

Closed mattmeye closed 1 month ago

mattmeye commented 1 month ago

Used Version of Home Assistant:

Core 2024.10.3
Supervisor 2024.10.2
Operating System 13.2
Frontend 20241002.3

Used Version of ha-pysmaplus:

v0.4.6.3

Describe the bug, Remarks, ... I get an error during the integration creation:

Der Konfigurationsfluss konnte nicht geladen werden: {"message":"Invalid handler specified"}

Home Assistant Core Logs

Logger: homeassistant.config_entries
Quelle: config_entries.py:2945
Erstmals aufgetreten: 23:08:58 (5 Vorkommnisse)
Zuletzt protokolliert: 23:15:41

Error occurred loading flow for integration pysmaplus: cannot import name 'ModbusResponse' from 'pymodbus.pdu' (/usr/local/lib/python3.12/site-packages/pymodbus/pdu/__init__.py)
>pip list | grep pymodbus
# empty result, pymodbus seems not installed

Steps to reproduce:

Installed manually pymodbus (3.7.4) and pysma-plus (0.3.16) - restarted again - same errors.

one step further:

error above: 3.12 is not installed, i have python3.11

/usr/local/lib/python3.12/site-packages/pymodbus/pdu/__init__.py

debug logs

Detected blocking call to import_module with args ('custom_components.pysmaplus.config_flow',) inside the event loop by integration 'config' at homeassistant/components/config/config_entries.py, 
line 179: return await super()._post_impl(request, data) (offender: /usr/src/homeassistant/homeassistant/loader.py, 
line 1296: return importlib.import_module(f"{self.pkg_path}.{platform_name}")), please create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+config%22 For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#import_module Traceback (most recent call last): File "<frozen runpy>", 
line 198, in _run_module_as_main File "<frozen runpy>", 
line 88, in _run_code File "/usr/src/homeassistant/homeassistant/__main__.py", 
line 223, in <module> sys.exit(main()) File "/usr/src/homeassistant/homeassistant/__main__.py", 
line 209, in main exit_code = runner.run(runtime_conf) File "/usr/src/homeassistant/homeassistant/runner.py", 
line 189, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.12/asyncio/base_events.py", 
line 674, in run_until_complete self.run_forever() File "/usr/local/lib/python3.12/asyncio/base_events.py", 
line 641, in run_forever self._run_once() File "/usr/local/lib/python3.12/asyncio/base_events.py", 
line 1990, in _run_once handle._run() File "/usr/local/lib/python3.12/asyncio/events.py", 
line 88, in _run self._context.run(self._callback, *self._args) File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", 
line 477, in _handle_request resp = await request_handler(request) File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", 
line 559, in _handle return await handler(request) File "/usr/local/lib/python3.12/site-packages/aiohttp/web_middlewares.py", 
line 117, in impl return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", 
line 92, in security_filter_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", 
line 210, in forwarded_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", 
line 26, in request_context_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/ban.py", 
line 85, in ban_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/auth.py", 
line 242, in auth_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/headers.py", 
line 32, in headers_middleware response = await handler(request) File "/usr/src/homeassistant/homeassistant/helpers/http.py", 
line 73, in handle result = await handler(request, **request.match_info) File "/usr/src/homeassistant/homeassistant/components/http/decorators.py", 
line 81, in with_admin return await func(self, request, *args, **kwargs) File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", 
line 74, in wrapper return await method(view, request, data, *args, **kwargs) File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", 
line 172, in post return await self._post_impl(request, data) File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", 
line 179, in _post_impl return await super()._post_impl(request, data)

Used Interface/Access Method (I want to use) see https://raw.githubusercontent.com/littleyoda/ha-pysmaplus/main/docs/images/interfaces.png EnnexOS-based: [x]

List of the SMA devices (I want to integrate) Inverter: SMA Tripower X 15

Screenshots and Diagnose Information If applicable, add screenshots to help explain your problem and send the Diagnose Information to the developer. (E-Mail can be found here: https://littleyoda.github.io/)

littleyoda commented 1 month ago

fixed in 0.4.6.5

mattmeye commented 1 month ago

Thank you very much! Updated, restarted, works <3