mirror of
https://github.com/mjg59/python-broadlink.git
synced 2024-11-13 03:00:11 +01:00
Allow string mac address in constructor
This commit is contained in:
parent
1d6d8d2aee
commit
77f11c8d49
@ -143,7 +143,7 @@ def discover(timeout=None, local_ip_address=None):
|
||||
class device:
|
||||
def __init__(self, host, mac, devtype, timeout=10):
|
||||
self.host = host
|
||||
self.mac = mac
|
||||
self.mac = mac.encode() if isinstance(mac, str) else mac
|
||||
self.devtype = devtype
|
||||
self.timeout = timeout
|
||||
self.count = random.randrange(0xffff)
|
||||
|
Loading…
Reference in New Issue
Block a user