rospogrigio / daikin_residential

Cloud control of Daikin devices that are supported by Daikin Residential Controller app.
GNU General Public License v3.0
284 stars 37 forks source link

Missing valid datapoint on units without horizontal swing while setting vertical swing #107

Open droscy opened 1 year ago

droscy commented 1 year ago

When enabling vertical swing on units without horizontal swing the error Please provide a valid datapoint definition that exists in the data structure is reported. This is the stack trace of the exception:

2022-11-08 06:32:36.674 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140437063840384] Please provide a valid datapoint definition that exists in the data structure
Traceback (most recent call last):
  File "/opt/homeassistant/.pyenv/versions/3.10.7/envs/homeassistant04/lib/python3.10/site-packages/homeassistant/components/websocket_api/commands.py", line 200, in handle_call_service
    await hass.services.async_call(
  File "/opt/homeassistant/.pyenv/versions/3.10.7/envs/homeassistant04/lib/python3.10/site-packages/homeassistant/core.py", line 1738, in async_call
    task.result()
  File "/opt/homeassistant/.pyenv/versions/3.10.7/envs/homeassistant04/lib/python3.10/site-packages/homeassistant/core.py", line 1775, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/opt/homeassistant/.pyenv/versions/3.10.7/envs/homeassistant04/lib/python3.10/site-packages/homeassistant/helpers/entity_component.py", line 204, in handle_service
    await service.entity_service_call(
  File "/opt/homeassistant/.pyenv/versions/3.10.7/envs/homeassistant04/lib/python3.10/site-packages/homeassistant/helpers/service.py", line 676, in entity_service_call
    future.result()  # pop exception if have
  File "/opt/homeassistant/.pyenv/versions/3.10.7/envs/homeassistant04/lib/python3.10/site-packages/homeassistant/helpers/entity.py", line 931, in async_request_call
    await coro
  File "/opt/homeassistant/.pyenv/versions/3.10.7/envs/homeassistant04/lib/python3.10/site-packages/homeassistant/helpers/service.py", line 713, in _handle_entity_call
    await result
  File "/opt/homeassistant/.homeassistant/custom_components/daikin_residential/climate.py", line 247, in async_set_swing_mode
    await self._device.async_set_swing_mode(swing_mode)
  File "/opt/homeassistant/.homeassistant/custom_components/daikin_residential/daikin_base.py", line 275, in async_set_swing_mode
    await self.setValue(ATTR_HSWING_MODE, new_hMode)
  File "/opt/homeassistant/.homeassistant/custom_components/daikin_residential/daikin_base.py", line 135, in setValue
    return await self.set_data(cmd_set[0], cmd_set[1], cmd_set[2], value)
  File "/opt/homeassistant/.homeassistant/custom_components/daikin_residential/device.py", line 334, in set_data
    raise Exception(
Exception: Please provide a valid datapoint definition that exists in the data structure

And if vertical swing is off, the UI shows an empty selection for "Swing mode"

No vertical swing selected

These errors were discovered while developing PR #105 and I will fix them there. If that PR won't be merged I will create a new PR just to solve this issue.

jwillemsen commented 8 months ago

Maybe you can try https://github.com/jwillemsen/daikin_residential_altherma/releases/tag/v3.0.0, it maybe has the necessary changes for this issue