lkempf / casambi-bt-hass

32 stars 12 forks source link

TypeError: Casambi.__init__() takes from 1 to 2 positional arguments but 3 were given #60

Closed tjorim closed 10 months ago

tjorim commented 10 months ago

Describe the bug Casambi fails to set up.

To Reproduce Steps to reproduce the behavior:

  1. Install the latest version from the main branch.
  2. Reboot Home Assistant
  3. Check the error in the Home Assistant logs

Versions

Logs

Logger: homeassistant.config_entries
Source: config_entries.py:402
First occurred: 15:03:27 (1 occurrences)
Last logged: 15:03:27

Error setting up entry Evolution for casambi_bt: Unexpected error creating network 6D:2A:B2:63:D8:B0
Traceback (most recent call last):
  File "/config/custom_components/casambi_bt/__init__.py", line 78, in async_casmbi_api_setup
    casa = Casambi(client, get_config_dir(hass))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Casambi.__init__() takes from 1 to 2 positional arguments but 3 were given

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

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 402, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/casambi_bt/__init__.py", line 32, in async_setup_entry
    casa_api = await async_casmbi_api_setup(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/casambi_bt/__init__.py", line 96, in async_casmbi_api_setup
    raise ConfigEntryError(f"Unexpected error creating network {address}") from err
homeassistant.exceptions.ConfigEntryError: Unexpected error creating network 6D:2A:B2:63:D8:B0
lkempf commented 10 months ago

This is expected. An updated version of casambi-bt is required I haven't been able to publish yet. But I should probably think about a workflow that makes sure the master branch always works

tjorim commented 10 months ago

Alright, good to know. I learned my lesson installing master instead of a release ;)