diff options
author | Bartosz Fenski <fenio@debian.org> | 2019-05-18T07·07+0200 |
---|---|---|
committer | Matthew Garrett <mjg59@google.com> | 2019-05-18T07·07-0700 |
commit | 852cbc24734bf3f7ac03080aa37374276f7a2856 (patch) | |
tree | 3ba3f5796e7bb630986c67b1703182d7bf7a0b40 /cli | |
parent | 77f11c8d49255d6f41c35f0aefb87d648af66cfd (diff) |
adding base64 output (#239)
base64 output useful when working with Home-Assistant
Diffstat (limited to '')
-rwxr-xr-x | cli/broadlink_cli | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/cli/broadlink_cli b/cli/broadlink_cli index a4d9a20d24d7..9317cd197c21 100755 --- a/cli/broadlink_cli +++ b/cli/broadlink_cli @@ -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: |