oischinger / ha_vicare

Inofficial Home Assistant custom component for Viessmann ViCare API
61 stars 33 forks source link

setProgramTemperature: Command failed with status code 400. Reason given was: COMMAND_NOT_FOUND #161

Closed adorobis closed 1 year ago

adorobis commented 1 year ago

Home Assistant: 2023.10.0 Vicare Version v1.0.0-beta.2 Gas Boiler: Vitodens 200-W

Since this morning I started to see the following errors in the log. At that time I was not doing any changes to the climate settings neither manually nor by automation. Not sure if that is some problem on the API side? I've upgraded to latest HA release last night but this error is only showing up this morning.

2023-10-05 10:52:55.265 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140318566458560] (PyViCareCommandError(...), 'Command failed with status code 400. Reason given was: COMMAND_NOT_FOUND')
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 226, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 2012, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2049, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 235, in handle_service
    return await service.entity_service_call(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 876, in entity_service_call
    response_data = await _handle_entity_call(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 948, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 632, in async_service_temperature_set
    await entity.async_set_temperature(**kwargs)
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 482, in async_set_temperature
    await self.hass.async_add_executor_job(
  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/vicare/climate.py", line 394, in set_temperature
    self._circuit.setProgramTemperature(self._current_program, temp)
  File "/usr/local/lib/python3.11/site-packages/PyViCare/PyViCareHeatingDevice.py", line 420, in setProgramTemperature
    return self.service.setProperty(f"heating.circuits.{self.circuit}.operating.programs.{program}",
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/PyViCare/PyViCareCachedService.py", line 29, in setProperty
    response = super().setProperty(property_name, action, data)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/PyViCare/PyViCareService.py", line 60, in setProperty
    return self.oauth_manager.post(url, post_data)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/PyViCare/PyViCareAbstractOAuthManager.py", line 94, in post
    self.__handle_command_error(response)
  File "/usr/local/lib/python3.11/site-packages/PyViCare/PyViCareAbstractOAuthManager.py", line 70, in __handle_command_error
    raise PyViCareCommandError(response)
PyViCare.PyViCareUtils.PyViCareCommandError: (PyViCareCommandError(...), 'Command failed with status code 400. Reason given was: COMMAND_NOT_FOUND')
meks007 commented 1 year ago

same error here

adorobis commented 1 year ago

Issue is gone