|
@@ -313,10 +313,10 @@ class TuyaLocalDevice(object):
|
|
|
if self._api.parent:
|
|
if self._api.parent:
|
|
|
self._api.parent.set_socketPersistent(persist)
|
|
self._api.parent.set_socketPersistent(persist)
|
|
|
|
|
|
|
|
|
|
+ last_heartbeat = self._cached_state.get("updated_at", 0)
|
|
|
while self._running:
|
|
while self._running:
|
|
|
error_count = self._api_working_protocol_failures
|
|
error_count = self._api_working_protocol_failures
|
|
|
force_backoff = False
|
|
force_backoff = False
|
|
|
- last_heartbeat = self._cached_state.get("updated_at", 0)
|
|
|
|
|
try:
|
|
try:
|
|
|
await self._api_lock.acquire()
|
|
await self._api_lock.acquire()
|
|
|
last_cache = self._cached_state.get("updated_at", 0)
|
|
last_cache = self._cached_state.get("updated_at", 0)
|