mirror of
https://github.com/mjg59/python-broadlink.git
synced 2024-11-22 07:00:12 +01:00
adding base64 output (#239)
base64 output useful when working with Home-Assistant
This commit is contained in:
parent
77f11c8d49
commit
852cbc2473
@ -134,6 +134,7 @@ if args.learn or args.learnfile:
|
||||
else ''.join(format(x, '02x') for x in bytearray(data))
|
||||
if args.learn:
|
||||
print(learned)
|
||||
print("Base64: " + base64.b64encode(learned.decode("hex")))
|
||||
if args.learnfile:
|
||||
print("Saving to {}".format(args.learnfile))
|
||||
with open(args.learnfile, "w") as text_file:
|
||||
|
Loading…
Reference in New Issue
Block a user