Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

180 wireless detector #85

Closed
Yaseen14643 opened this issue Jan 11, 2024 · 3 comments
Closed

180 wireless detector #85

Yaseen14643 opened this issue Jan 11, 2024 · 3 comments

Comments

@Yaseen14643
Copy link

Yaseen14643 commented Jan 11, 2024

Hi, the config fails to setup after adding a 180 wireless detector.
As it's not on the device list is there anyway of just ignoring it and loading the rest of the devices.
Logs below:

Logger: homeassistant.config_entries
Source: config_entries.py:406
First occurred: 7:32:53 AM (1 occurrences)
Last logged: 7:32:53 AM

Error setting up entry Hikvision_axpro_192.168.68.115 for hikvision_axpro
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 406, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/hikvision_axpro/__init__.py", line 107, in async_setup_entry
    await hass.async_add_executor_job(coordinator.init_device)
  File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/hikvision_axpro/__init__.py", line 185, in init_device
    self.load_devices()
  File "/config/custom_components/hikvision_axpro/__init__.py", line 223, in load_devices
    devices = self._load_devices()
              ^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/hikvision_axpro/__init__.py", line 236, in _load_devices
    return ZonesConf.from_dict(response.json())
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/hikvision_axpro/model.py", line 937, in from_dict
    list = from_list(ZoneConfListWrap.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 921, in from_dict
    zone = ZoneConfig.from_dict(obj.get("Zone"))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/hikvision_axpro/model.py", line 676, in from_dict
    detector_type = DetectorType(obj.get("detectorType"))
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/enum.py", line 712, in __call__
    return cls.__new__(cls, value)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/enum.py", line 1135, in __new__
    raise ve_exc
ValueError: 'wireless180PanoramicDetector' is not a valid DetectorType
@petrleocompel
Copy link
Owner

Perfect I will add this value

@petrleocompel
Copy link
Owner

Fixed in v2.1.0-beta12

still can contain problems. Just reopen issue in any case

@Yaseen14643
Copy link
Author

Perfect, thanks. I was on v2.1.0-beta11 but updated and its working again. Much appreciated.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants