Checking device arg too for defining dev instance (#129)
This commit is contained in:
parent
8bc67af6d7
commit
9ff6fa817b
1 changed files with 2 additions and 3 deletions
|
@ -87,7 +87,7 @@ elif args.mac:
|
|||
host = args.host
|
||||
mac = bytearray.fromhex(args.mac)
|
||||
|
||||
if args.host:
|
||||
if args.host or args.device:
|
||||
dev = broadlink.gendevice(type, (host, 80), mac)
|
||||
dev.auth()
|
||||
|
||||
|
@ -130,4 +130,3 @@ if args.learn or args.learnfile:
|
|||
text_file.write(learned)
|
||||
else:
|
||||
print "No data received..."
|
||||
|
||||
|
|
Loading…
Reference in a new issue