about summary refs log tree commit diff
path: root/cli/broadlink_cli
diff options
context:
space:
mode:
authorBartosz Fenski <fenio@debian.org>2019-05-18T07·07+0200
committerMatthew Garrett <mjg59@google.com>2019-05-18T07·07-0700
commit852cbc24734bf3f7ac03080aa37374276f7a2856 (patch)
tree3ba3f5796e7bb630986c67b1703182d7bf7a0b40 /cli/broadlink_cli
parent77f11c8d49255d6f41c35f0aefb87d648af66cfd (diff)
adding base64 output (#239)
base64 output useful when working with Home-Assistant
Diffstat (limited to 'cli/broadlink_cli')
-rwxr-xr-xcli/broadlink_cli1
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: