petrleocompel / hikaxpro_hacs

HACS repository of Hikvision Ax Pro integration for home assistant
MIT License
40 stars 4 forks source link

not working after update to v2.0.0-beta6 #40

Closed wifi75 closed 1 year ago

wifi75 commented 1 year ago

hello after last update problem sto start integration.

Logger: homeassistant.config_entries
Source: custom_components/hikvision_axpro/model.py:43
Integration: hikvision_axpro
First occurred: 13:41:32 (2 occurrences)
Last logged: 13:51:14

Error setting up entry Hikvision_axpro_192.168.1.17 for hikvision_axpro
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 387, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/config/custom_components/hikvision_axpro/__init__.py", line 105, in async_setup_entry
    await hass.async_add_executor_job(coordinator.init_device)
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/hikvision_axpro/__init__.py", line 177, in init_device
    self.load_devices()
  File "/config/custom_components/hikvision_axpro/__init__.py", line 181, in load_devices
    devices = self._load_devices()
  File "/config/custom_components/hikvision_axpro/__init__.py", line 194, in _load_devices
    return ZonesConf.from_dict(response.json())
  File "/config/custom_components/hikvision_axpro/model.py", line 817, in from_dict
    list = from_list(ListElement.from_dict, obj.get("List"))
  File "/config/custom_components/hikvision_axpro/model.py", line 29, in from_list
    return [f(y) for y in x]
  File "/config/custom_components/hikvision_axpro/model.py", line 29, in <listcomp>
    return [f(y) for y in x]
  File "/config/custom_components/hikvision_axpro/model.py", line 801, in from_dict
    zone = ZoneConfig.from_dict(obj.get("Zone"))
  File "/config/custom_components/hikvision_axpro/model.py", line 679, in from_dict
    arm_mode = from_union([ArmMode, from_none], obj.get("armMode"))
  File "/config/custom_components/hikvision_axpro/model.py", line 43, in from_union
    assert False
AssertionError
wifi75 commented 1 year ago

hello I realized that I already have the latest version installed, i.e. v2.0.0-beta6. and i always have problems.

image

image

petrleocompel commented 1 year ago

Will fix in beta7

petrleocompel commented 1 year ago

Beta7 released