@@ -468,7 +468,7 @@ class TuyaLocalDevice(object):
if not self.has_returned_state or wifi_api.socket is None:
force_backoff = True
- if self.running:
+ if self._running:
await asyncio.sleep(5 if force_backoff else 0.1)
# Close the persistent connection when exiting the loop