Sometimes devices seem to return a tuple instead of a dict (empty result?). Don't try to add full_poll to that, nor return it as a data response Discussion #5148
@@ -415,8 +415,9 @@ class TuyaLocalDevice(object):
else:
if "dps" in poll:
poll = poll["dps"]
- poll["full_poll"] = full_poll
- yield poll
+ if isinstance(poll, dict):
+ poll["full_poll"] = full_poll
+ yield poll
except CancelledError:
self._running = False