mirror of
https://github.com/mjg59/python-broadlink.git
synced 2024-11-21 14:43:30 +01:00
Overload __str__ in the device class (#468)
This commit is contained in:
parent
1d81ebd1d0
commit
73dab5c3d5
@ -143,6 +143,13 @@ class device:
|
||||
"Locked" if self.is_locked else "Unlocked",
|
||||
)
|
||||
|
||||
def __str__(self):
|
||||
return "%s (%s at %s)" % (
|
||||
self.name,
|
||||
self.model or hex(self.devtype),
|
||||
self.host[0],
|
||||
)
|
||||
|
||||
def update_aes(self, key: bytes) -> None:
|
||||
"""Update AES."""
|
||||
self.aes = Cipher(
|
||||
|
Loading…
Reference in New Issue
Block a user