Skip to content

Commit

Permalink
Update chuangmi_ir.py to accept 2 arguments (frequency and length) (#…
Browse files Browse the repository at this point in the history
…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"
  • Loading branch information
mpsOxygen authored Aug 12, 2021
1 parent 59e1603 commit a11b944
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion miio/chuangmi_ir.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down

0 comments on commit a11b944

Please sign in to comment.