keshavdv / victron-hacs

Home Assistant plug-in for Victron Instant Readout compatible devices
59 stars 21 forks source link

Failed to set up. #118

Open kevinkey619 opened 3 months ago

kevinkey619 commented 3 months ago

I keep getting the below errors in the log:

Logger: homeassistant.config_entries Source: config_entries.py:586 First occurred: 7:12:22 PM (1 occurrences) Last logged: 7:12:22 PM

Error setting up entry SmartShunt HQ2103ZW9YM for victron_ble Traceback (most recent call last): File "/srv/homeassistant/lib/python3.12/site-packages/homeassistant/loader.py", line 1247, in _load_platform cache[full_name] = self._import_platform(platform_name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/srv/homeassistant/lib/python3.12/site-packages/homeassistant/loader.py", line 1279, in _import_platform return importlib.import_module(f"{self.pkg_path}.{platform_name}") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/srv/homeassistant/lib/python3.12/site-packages/homeassistant/util/loop.py", line 200, in protected_loop_func return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/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 995, in exec_module File "", line 488, in _call_with_frames_removed File "/home/homeassistant/.homeassistant/custom_components/victron_ble/sensor.py", line 198, in PassiveBluetoothDataProcessor[Optional[Union[float, int]]]


  File "/usr/lib/python3.12/typing.py", line 398, in inner
    return func(*args, **kwds)
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/typing.py", line 1083, in _generic_class_getitem
    _check_generic(cls, params, len(cls.__parameters__))
  File "/srv/homeassistant/lib/python3.12/site-packages/typing_extensions.py", line 2947, in _check_generic
    raise TypeError(f"Too {'many' if alen > elen else 'few'} arguments"
TypeError: Too few arguments for <class 'homeassistant.components.bluetooth.passive_update_processor.PassiveBluetoothDataProcessor'>; actual 1, expected at least 2

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.12/site-packages/homeassistant/config_entries.py", line 586, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/homeassistant/.homeassistant/custom_components/victron_ble/__init__.py", line 36, in async_setup_entry
    await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
  File "/srv/homeassistant/lib/python3.12/site-packages/homeassistant/config_entries.py", line 2046, in async_forward_entry_setups
    await integration.async_get_platforms(platforms)
  File "/srv/homeassistant/lib/python3.12/site-packages/homeassistant/loader.py", line 1160, in async_get_platforms
    import_future.result()
  File "/srv/homeassistant/lib/python3.12/site-packages/homeassistant/loader.py", line 1148, in async_get_platforms
    platforms.update(self._load_platforms(platform_names))
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/srv/homeassistant/lib/python3.12/site-packages/homeassistant/loader.py", line 1073, in _load_platforms
    platform_name: self._load_platform(platform_name)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/srv/homeassistant/lib/python3.12/site-packages/homeassistant/loader.py", line 1267, in _load_platform
    raise ImportError(
ImportError: Exception importing custom_components.victron_ble.sensor
kevinkey619 commented 3 months ago

I resolved the issue by downgrading to version 2024.5

WanderingStar commented 3 months ago

Ran into this same error. 2024.6 is also broken in the same way.

I suspect this change is the one that causes it: https://github.com/home-assistant/core/commit/4f4389ba850190a19473b593015c89013198aa9e

paleos commented 2 months ago

The same problem. Temporarily resolved by downgrading to version 2024.5.5.

scott-wt commented 2 months ago

First of all, thanks for this fantastic HA integration. When it works it's amazing. I had the same issue. I restored my 2024.5.5 core and was able to add my Victron device, but it broke a lot of my other integrations, and I lost 2 months of energy data. When I updated the core, this plugin stopped working again. Are you leaving the core at 2024.5.5?

IoT-CI-Ltd commented 2 months ago

Hi, Does anyone have a fix for this that does not require roll-back? Thanks very much

scott-wt commented 2 months ago

https://github.com/j9brown/victron-hacs

Using this repository worked for me.

janskonto commented 2 months ago

works for me as well!

ons. 28. aug. 2024 kl. 17:15 skrev scott-wt @.***>:

https://github.com/j9brown/victron-hacs

Using this repository worked for me.

— Reply to this email directly, view it on GitHub https://github.com/keshavdv/victron-hacs/issues/118#issuecomment-2315646377, or unsubscribe https://github.com/notifications/unsubscribe-auth/A72UUOFAZOADWU23NFZFRU3ZTXSSHAVCNFSM6AAAAABLBXFVWOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMJVGY2DMMZXG4 . You are receiving this because you are subscribed to this thread.Message ID: @.***>