I’m using the HTTP API with curl and vbscripts to automate some lighting tasks. I have successfully used the Set Power curl example in the API documentation to change the state of the bulbs. However, when I try to change the state and duration. I get a response of error: state type not valid. I tried the command with curl and other forms like below but I can’t figure out the command structure to set both state and duration. Any advice would be appreciated, I’m very new to all this.
curl -H “Authorization: Bearer YOUR_APP_TOKEN” -X PUT -d “state=on” -d “duration=120” “https://api.lifx.com/v1beta1/lights/all/power”