keshavdv / victron-hacs

Home Assistant plug-in for Victron Instant Readout compatible devices
61 stars 23 forks source link

updated home assistant broke the integration #121

Closed RayDog1995 closed 2 months ago

RayDog1995 commented 2 months ago

Version of the custom_component

Configuration

latest home assistant version with freshly installed victron integration

Add your logs here.
Logger: homeassistant.loader
Source: loader.py:1264
First occurred: 7:51:27 PM (4 occurrences)
Last logged: 7:54:49 PM

Unexpected exception importing platform custom_components.victron_ble.sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1264, in _load_platform
    cache[full_name] = self._import_platform(platform_name)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1296, in _import_platform
    return importlib.import_module(f"{self.pkg_path}.{platform_name}")
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  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/victron_ble/sensor.py", line 198, in <module>
    PassiveBluetoothDataProcessor[Optional[Union[float, int]]]
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/typing.py", line 398, in inner
    return func(*args, **kwds)
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/typing.py", line 1101, in _generic_class_getitem
    _check_generic(cls, params, len(cls.__parameters__))
  File "/usr/local/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

## Describe the bug

This integration was working until I stupidly updated HA, I tried re-installing integration to no luck 

## Debug log

<!-- To enable debug logs check this https://www.home-assistant.io/components/logger/ -->

```text

2024-09-06 01:51:16.570 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration victron_ble which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-09-06 01:51:27.585 ERROR (ImportExecutor_0) [homeassistant.loader] Unexpected exception importing platform custom_components.victron_ble.sensor
File "/config/custom_components/victron_ble/sensor.py", line 198, in <module>
2024-09-06 01:51:27.609 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to import_module with args ('custom_components.victron_ble.sensor',) inside the event loop by custom integration 'victron_ble' at custom_components/victron_ble/__init__.py, line 36: await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS) (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/keshavdv/victron-hacs/issues
File "/config/custom_components/victron_ble/__init__.py", line 36, in async_setup_entry
2024-09-06 01:51:27.614 ERROR (MainThread) [homeassistant.loader] Unexpected exception importing platform custom_components.victron_ble.sensor
File "/config/custom_components/victron_ble/sensor.py", line 198, in <module>
2024-09-06 01:51:27.619 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry SmartSolar HQ2249JKCVX for victron_ble
File "/config/custom_components/victron_ble/sensor.py", line 198, in <module>
File "/config/custom_components/victron_ble/__init__.py", line 36, in async_setup_entry
ImportError: Exception importing custom_components.victron_ble.sensor
2024-09-06 01:54:49.429 ERROR (ImportExecutor_0) [homeassistant.loader] Unexpected exception importing platform custom_components.victron_ble.sensor
File "/config/custom_components/victron_ble/sensor.py", line 198, in <module>
2024-09-06 01:54:49.464 ERROR (MainThread) [homeassistant.loader] Unexpected exception importing platform custom_components.victron_ble.sensor
File "/config/custom_components/victron_ble/sensor.py", line 198, in <module>
2024-09-06 01:54:49.467 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Krusty-Solar for victron_ble
File "/config/custom_components/victron_ble/sensor.py", line 198, in <module>
File "/config/custom_components/victron_ble/__init__.py", line 36, in async_setup_entry
ImportError: Exception importing custom_components.victron_ble.sensor
2024-09-06 02:11:08.964 ERROR (ImportExecutor_0) [homeassistant.loader] Unexpected exception importing platform custom_components.victron_ble.sensor
File "/config/custom_components/victron_ble/sensor.py", line 198, in <module>
2024-09-06 02:11:09.003 ERROR (MainThread) [homeassistant.loader] Unexpected exception importing platform custom_components.victron_ble.sensor
File "/config/custom_components/victron_ble/sensor.py", line 198, in <module>
2024-09-06 02:11:09.006 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry SmartSolar HQ2249JKCVX for victron_ble
File "/config/custom_components/victron_ble/sensor.py", line 198, in <module>
File "/config/custom_components/victron_ble/__init__.py", line 36, in async_setup_entry
ImportError: Exception importing custom_components.victron_ble.sensor
BurlyOaf commented 2 months ago

I am having the same experience. Tried removing and re-downloading the integration, with the same behaviour

JamesPerrins commented 2 months ago

Have you seen this post. https://github.com/keshavdv/victron-hacs/issues/116#issuecomment-2156093039

I have it working having done this in the latest version of ha. Tested with Bluetooth shunt which is all I have to have at the moment.

On Fri, 6 Sept 2024, 16:50 BurlyOaf, @.***> wrote:

I am having the same experience. Tried removing and re-downloading the integration, with the same behaviour

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

RayDog1995 commented 2 months ago

ok yep that did it. I had tried that before i made this post but i must have made a paste mistake or something, thank you very much.