From da267471c3272f1fcd1ff248a0f0ceebc0f6688c Mon Sep 17 00:00:00 2001 From: uzlonewolf Date: Wed, 12 Oct 2022 08:24:52 -0700 Subject: [PATCH] Add more info to repr(device) --- tinytuya/core.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tinytuya/core.py b/tinytuya/core.py index 9085c41c..6bd4b875 100644 --- a/tinytuya/core.py +++ b/tinytuya/core.py @@ -625,7 +625,8 @@ def __del__(self): def __repr__(self): # FIXME can do better than this - return "%r" % ((self.id, self.address),) + return ("%s( %r, address=%r, local_key=%r, dev_type=%r, connection_timeout=%r, version=%r, persist=%r )" % + (self.__class__.__name__, self.id, self.address, self.real_local_key.decode(), self.dev_type, self.connection_timeout, self.version, self.socketPersistent)) def _get_socket(self, renew): if renew and self.socket is not None: