mirror of
https://github.com/GAM-team/GAM.git
synced 2026-07-03 12:21:35 +00:00
command payload value is a JSON string, not a dict
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
import datetime
|
import datetime
|
||||||
|
import json
|
||||||
import time
|
import time
|
||||||
|
|
||||||
import googleapiclient
|
import googleapiclient
|
||||||
@@ -40,7 +41,7 @@ def issue_command():
|
|||||||
body['commandType'] = command_map[command]
|
body['commandType'] = command_map[command]
|
||||||
i += 2
|
i += 2
|
||||||
if command == 'setvolume':
|
if command == 'setvolume':
|
||||||
body['payload'] = {'volume': int(sys.argv[i])}
|
body['payload'] = json.dumps({'volume': sys.argv[i]})
|
||||||
i += 1
|
i += 1
|
||||||
elif myarg == 'timestocheckstatus':
|
elif myarg == 'timestocheckstatus':
|
||||||
times_to_check_status = int(sys.argv[i+1])
|
times_to_check_status = int(sys.argv[i+1])
|
||||||
|
|||||||
Reference in New Issue
Block a user