Cycle

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

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

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.

Path Params
string
required

The selector to limit which lights this applies to

Body Params
states
array of strings
required

Array of state hashes as per Set State. Must have 2 to 10 entries.

states*
string
Defaults to forward

Direction in which to cycle through the list. Can be forward or backward

Response

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json