From 852cbc24734bf3f7ac03080aa37374276f7a2856 Mon Sep 17 00:00:00 2001 From: Bartosz Fenski Date: Sat, 18 May 2019 09:07:25 +0200 Subject: [PATCH] adding base64 output (#239) base64 output useful when working with Home-Assistant --- cli/broadlink_cli | 1 + 1 file changed, 1 insertion(+) diff --git a/cli/broadlink_cli b/cli/broadlink_cli index a4d9a20..9317cd1 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: