From a11b9447c00c7ddb6dcd877bf8e49dae962e0802 Mon Sep 17 00:00:00 2001 From: mpsOxygen Date: Thu, 12 Aug 2021 21:03:09 +0300 Subject: [PATCH] Update chuangmi_ir.py to accept 2 arguments (frequency and length) (#1091) Changed the arg_types variable to have a length of 2 in order to be able to use something like this (both frequency and length): miiocli chuangmiir --ip 192.168.10.14 --token REDACTED play "raw:mc0mU0lkxm00mEsmkznEsmMzmM0AIqazYAPwA1Ag8BjwIfAy8DLwMvAZ8BnwIfAY8BjwA/AD8APwA/AD8APwA/AD8APwqPCo8PzwIfAD8APwSfFX8FHwA/AD8APwA/AD8APwA/AD8APwA/AD8APwA/AD8APwA/AD8APwA/AD8APxgfFw8APwKPAY+bA=:38000:224" --- miio/chuangmi_ir.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/miio/chuangmi_ir.py b/miio/chuangmi_ir.py index 809393526..7499873b0 100644 --- a/miio/chuangmi_ir.py +++ b/miio/chuangmi_ir.py @@ -153,7 +153,7 @@ def play(self, command: str): else: command_type, command, *command_args = command.split(":") - arg_types = [int] + arg_types = [int, int] if len(command_args) > len(arg_types): raise ChuangmiIrException("Invalid command arguments count")