SwitchBotAPI
SwitchBotAPI copied to clipboard
Multiple commands per Request
Current Situation
Right now multiple commands have to be sent as their own request to:
POST /v1.1/devices/{deviceId}/commands
For certain appliances, it is desirable to send multiple commands at once. Like sending setBrightness and setColor to a Color Bulb. This results in having to fire multiple commands back-to-back to the SwitchBot API server.
Proposed Change
It would be great if commands could also be sent as an array. Instead of
{"command":"setBrightness","parameter":2,"commandType":"command"}
{"command":"setColor","parameter":"255:0:0","commandType":"command"}
an array of both:
[
{"command":"setBrightness","parameter":2,"commandType":"command"},
{"command":"setColor","parameter":"255:0:0","commandType":"command"}
]
Additional Context
No response