Skip to content

Commit

Permalink
Add more info to repr(device)
Browse files Browse the repository at this point in the history
  • Loading branch information
uzlonewolf committed Oct 12, 2022
1 parent c90f31a commit da26747
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tinytuya/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit da26747

Please sign in to comment.