mirror of
https://github.com/mjg59/python-broadlink.git
synced 2024-11-11 02:10:12 +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",
|
"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:
|
def update_aes(self, key: bytes) -> None:
|
||||||
"""Update AES."""
|
"""Update AES."""
|
||||||
self.aes = Cipher(
|
self.aes = Cipher(
|
||||||
|
Loading…
Reference in New Issue
Block a user