Open findel opened 2 years ago
Seeing the same exception.
2022-12-23 08:16:50.196 ERROR (MainThread) [custom_components.localtuya.common] [620...145] Failed to set DPs {1: True}
Traceback (most recent call last):
File "/usr/local/lib/python3.10/asyncio/locks.py", line 390, in acquire
await fut
asyncio.exceptions.CancelledError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/asyncio/tasks.py", line 456, in wait_for
return fut.result()
asyncio.exceptions.CancelledError
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/config/custom_components/localtuya/common.py", line 332, in set_dps
await self._interface.set_dps(states)
File "/config/custom_components/localtuya/pytuya/__init__.py", line 557, in set_dps
return await self.exchange(SET, dps)
File "/config/custom_components/localtuya/pytuya/__init__.py", line 486, in exchange
msg = await self.dispatcher.wait_for(seqno)
File "/config/custom_components/localtuya/pytuya/__init__.py", line 259, in wait_for
await asyncio.wait_for(self.listeners[seqno].acquire(), timeout=timeout)
File "/usr/local/lib/python3.10/asyncio/tasks.py", line 458, in wait_for
raise exceptions.TimeoutError() from exc
asyncio.exceptions.TimeoutError
The problem
I have some automations that gradually change bulb colours and/or brightness. I had to change from using the cloud API to localtuya because they send too many API calls.
But since switching to localtuya I regularly get "Failed to set DPs" errors (see log example below). I know that the DP number and value are valid as I can use
localtuya.set_dp
to run the same change without an error.Any idea what is causing this? Or how to fix it?
Environment
Steps to reproduce
Configuration
configuration.yaml
orconfig_flow
Here is the config for one of the affected bulbs:
Provide Home Assistant taceback/logs