petrleocompel / hikaxpro_hacs

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

Separate Area Arm/Disarm 404 Response #46

Closed djb383 closed 1 year ago

djb383 commented 1 year ago

Hello,

With "Include areas as separate zones for arm/disarm" enabled in the configuration, I get the following error if I try to Arm or Disarm an individual area:

Unexpected response status code 404 returned with message Can't locate the url

Arming and Disarming the whole panel still works OK. I am running v2.0.0-beta 10 with an AX Pro.

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 199, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1849, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1889, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 226, in handle_service
    await service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 798, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 980, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 838, in _handle_entity_call
    await result
  File "/config/custom_components/hikvision_axpro/alarm_control_panel.py", line 223, in async_alarm_arm_home
    await self.coordinator.async_arm_home(self.sys.id)
  File "/config/custom_components/hikvision_axpro/__init__.py", line 250, in async_arm_home
    is_success = await self.hass.async_add_executor_job(self._arm_home, sub_id)
  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 287, in _arm_home
    raise hikaxpro.errors.UnexpectedResponseCodeError(response.status_code, response.text)
errors.errors.UnexpectedResponseCodeError: Unexpected response status code 404 returned with message Can't locate the url
petrleocompel commented 1 year ago

will be included in next release