Sfoglia il codice sorgente

fix(device): don't reset cache timestamp when setting values

Since the original changes to make the predecessor async, the integration has reset
the cache updated_at to 0 in _set_values(), presumably to force an update ASAP.
Previously this did not interfere with updates, so something else must have been
resetting it to a proper timestamp before the receive loop saw it and revertted to
polling, but starting with 2026.4 release, we started seeing communication issues,
especially from protocol version 3.4 devices.

Thanks to @kishorviswanathan for pointing Claude in right direction in issue #4965

Most likely a fix for #5347, #5346, #5109
Possible fix for earlier issues #3827, #1323
Jason Rumney 18 ore fa
parent
commit
ee6e66f790
1 ha cambiato i file con 0 aggiunte e 1 eliminazioni
  1. 0 1
      custom_components/tuya_local/device.py

+ 0 - 1
custom_components/tuya_local/device.py

@@ -636,7 +636,6 @@ class TuyaLocalDevice(object):
         try:
             self._lock.acquire()
             self._api.set_multiple_values(properties, nowait=True)
-            self._cached_state["updated_at"] = 0
             now = time()
             self._last_connection = now
             pending_updates = self._get_pending_updates()