Make the light(s) cycle to the next or previous state in a list of states.

This endpoint lets you easily have a set of lights transition to the next state in a list of states you supply without having to implement client side logic to calculate the next state in the sequence.

For example, you can have a hardware button that will cycle through a few different brightness settings and off by simply binding a button press to send an identical Cycle request, and the API figures out the rest.

The API scores each state hash against the current states of all the lights in the selector, and if the score is high enough to be considered a match, it will apply the next state in the list, looping back to the first one if necessary. If there's no close match, it will apply the closest state to the selector.

The optional direction parameter determines the direction the API uses to determine the next state.

If you have a scenario where the Cycle API does not work as expected, please let us know on the forums.

Language
Credentials
Header
Click Try It! to start a request and see the response here!