|
|
@@ -350,7 +350,9 @@ class TuyaLocalDevice(object):
|
|
|
last_cache = self._cached_state.get("updated_at", 0)
|
|
|
now = time()
|
|
|
full_poll = False
|
|
|
- if persist == self.should_poll:
|
|
|
+ if (persist == self.should_poll) or (
|
|
|
+ persist and (self._api.socket is None)
|
|
|
+ ):
|
|
|
# use persistent connections after initial communication
|
|
|
# has been established. Until then, we need to rotate
|
|
|
# the protocol version, which seems to require a fresh
|