Skip to content

Commit

Permalink
Expect timeout error on device update dps. #233
Browse files Browse the repository at this point in the history
* A workaround for an issue on device >= 3.4, while waiting for correct seqno.
  • Loading branch information
xZetsubou committed May 16, 2024
1 parent fcc6911 commit 52a41d7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion custom_components/localtuya/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,11 @@ async def set_dps(self, states):
async def _async_refresh(self, _now):
if self._interface is not None:
self.debug("Refreshing dps for device")
await self._interface.update_dps(cid=self._node_id)
# This a workdaround for >= 3.4 devices, since there is an issue on waiting for the correct seqno
try:
await self._interface.update_dps(cid=self._node_id)
except TimeoutError:
pass

def _dispatch_status(self):
signal = f"localtuya_{self._device_config.id}"
Expand Down

0 comments on commit 52a41d7

Please sign in to comment.