Wiser iTRV - Timeout on climate.set_temperature or climate.set_hvac_mode

Hello,

I recently tried to add several Wiser thermostatic valves via ZHA, unfortunately I am having a problem when I try to change the temperature set point or mode.

Error executing service: <ServiceCall climate.set_hvac_mode (c:01GTYHKWSQ69ZYJXZABPSKM54Q): entity_id=['climate.chambre_flo_itrv_thermostat'], hvac_mode=heat>
Error executing service: <ServiceCall climate.set_temperature (c:01GTYHM4NFBCM8HF10DZB30M33): temperature=18.5, entity_id=['climate.chambre_flo_itrv_thermostat']>
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/asyncio/tasks.py", line 458, in wait_for
    fut.result()
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/srv/homeassistant2/lib/python3.10/site-packages/homeassistant/core.py", line 1826, in catch_exceptions
    await coro_or_task
  File "/srv/homeassistant2/lib/python3.10/site-packages/homeassistant/core.py", line 1845, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/srv/homeassistant2/lib/python3.10/site-packages/homeassistant/helpers/entity_component.py", line 213, in handle_service
    await service.entity_service_call(
  File "/srv/homeassistant2/lib/python3.10/site-packages/homeassistant/helpers/service.py", line 686, in entity_service_call
    future.result()  # pop exception if have
  File "/srv/homeassistant2/lib/python3.10/site-packages/homeassistant/helpers/entity.py", line 961, in async_request_call
    await coro
  File "/srv/homeassistant2/lib/python3.10/site-packages/homeassistant/helpers/service.py", line 726, in _handle_entity_call
    await result
  File "/srv/homeassistant2/lib/python3.10/site-packages/homeassistant/components/zha/climate.py", line 406, in async_set_hvac_mode
    if await self._thrm.async_set_operation_mode(HVAC_MODE_2_SYSTEM[hvac_mode]):
  File "/srv/homeassistant2/lib/python3.10/site-packages/homeassistant/components/zha/core/channels/hvac.py", line 250, in async_set_operation_mode
    if not await self.write_attributes({"system_mode": mode}):
  File "/srv/homeassistant2/lib/python3.10/site-packages/homeassistant/components/zha/core/channels/hvac.py", line 300, in write_attributes
    res = await self.cluster.write_attributes(data, **kwargs)
  File "/srv/homeassistant2/lib/python3.10/site-packages/zigpy/zcl/__init__.py", line 567, in write_attributes
    return await self.write_attributes_raw(attrs, manufacturer)
  File "/srv/homeassistant2/lib/python3.10/site-packages/zigpy/zcl/__init__.py", line 573, in write_attributes_raw
    result = await self._write_attributes(attrs, manufacturer=manufacturer)
  File "/srv/homeassistant2/lib/python3.10/site-packages/zigpy/zcl/__init__.py", line 324, in request
    return await self._endpoint.request(
  File "/srv/homeassistant2/lib/python3.10/site-packages/zigpy/endpoint.py", line 237, in request
    return await self.device.request(
  File "/srv/homeassistant2/lib/python3.10/site-packages/zigpy/device.py", line 313, in request
    return await asyncio.wait_for(req.result, timeout)
  File "/usr/local/lib/python3.10/asyncio/tasks.py", line 460, in wait_for
    raise exceptions.TimeoutError() from exc
asyncio.exceptions.TimeoutError

Do you know a way to fix this?

Thank you,
Florian

I started to notice it for Aqara TRV, so maybe that’s related to climate service and zha?

I didn’t see these issues previously, though, but I don’t remember since when they started to occure.

I am planning to implement some retry strategy with continue on error or continues temperature sync.