LIFX

App · 9 actions

Turn LIFX lights on and off, set their color and brightness, run effects and activate scenes.

Actions

ActionWhat it does
Activate a sceneSet the lights in a saved scene to the way the scene has them.
Breathe lightsFade the lights slowly to a color and back.
Check a colorCheck that LIFX understands a color, and see the hue, saturation, brightness and kelvin it means.
List lightsList the lights on the LIFX account, with whether each is on, its color and brightness, and the selector to control it by.
List scenesList the scenes saved on the LIFX account.
Pulse lightsFlash the lights quickly to a color and back.
Set lightsTurn lights on or off, or change their color or brightness.
Stop effectsStop any breathe, pulse or firmware effect running on the lights.
Toggle lights on or offTurn the lights off if any of them are on, or on if they are all off.

Activate a scene

Set the lights in a saved scene to the way the scene has them.

Inputs

Scenescene_idtextRequired
The scene to activate. Pick from the list or use a scene ID from an earlier step.
Durationdurationnumber
How many seconds the lights take to change. LIFX uses 1 if left blank.From 0 to 3155760000.
Ignoreignorelist
Parts of the scene to leave as the lights have them now.One or more of: power, infrared, duration, intensity, hue, saturation, brightness, kelvin.
Fastfasttrue/false
Send the change without checking the lights first or waiting for them to answer. Quicker, but the step can't say which lights changed.

Outputs

dataobject
The response from LIFX.
Example output
{
  "data": {
    "not_ok_count": 1,
    "ok_count": 1,
    "results": [
      {
        "id": "example",
        "label": "example",
        "status": "example"
      }
    ],
    "summary": "example"
  }
}

Breathe lights

Fade the lights slowly to a color and back.

Inputs

LightsselectortextRequired
Which lights to breathe: pick from the list, or type a LIFX selector such as all, id:d073d5000000, group_id:..., location_id:... or label:Desk lamp. Separate up to 25 with commas.
ColorcolortextRequired
The color to fade to, such as red, #ff0000, kelvin:2700 or hue:120 saturation:1.
From colorfrom_colortext
The color to start from. Leave blank to start from the light's current color.
Periodperiodnumber
How many seconds one cycle takes. LIFX uses 1 if left blank.At least 0.
Cyclescyclesnumber
How many times to repeat. LIFX uses 1 if left blank.At least 0.
Persistpersisttrue/false
Leave the lights on the effect's last color. Off by default, which puts them back as they were.
Power onpower_ontrue/false
Turn on lights that are off for the effect. On by default.
Peakpeaknumber
Where in each cycle the color is strongest, from 0 to 1. LIFX uses 0.5 if left blank.From 0 to 1.

Outputs

dataobject
The response from LIFX.
Example output
{
  "data": {
    "not_ok_count": 1,
    "ok_count": 1,
    "results": [
      {
        "id": "example",
        "label": "example",
        "status": "example"
      }
    ],
    "summary": "example"
  }
}

Check a color

Check that LIFX understands a color, and see the hue, saturation, brightness and kelvin it means.

Inputs

ColorcolortextRequired
The color to check, such as red, #ff0000, kelvin:2700 or hue:120 saturation:1 brightness:0.5.

Outputs

dataobject
The response from LIFX.
Example output
{
  "data": {
    "brightness": 1,
    "hue": 1,
    "kelvin": 1,
    "saturation": 1
  }
}

List lights

List the lights on the LIFX account, with whether each is on, its color and brightness, and the selector to control it by.

Inputs

LightsselectortextRequired
Which lights to list: pick from the list, or type a LIFX selector. Use all for every light on the account.

Outputs

datalist
The response from LIFX.
Example output
{
  "data": [
    {
      "brightness": 1,
      "color": {
        "hue": 1,
        "kelvin": 1,
        "saturation": 1
      },
      "connected": true,
      "effect": "example",
      "group": {
        "id": "example",
        "name": "example"
      },
      "id": "example",
      "label": "example",
      "last_seen": "example",
      "location": {
        "id": "example",
        "name": "example"
      },
      "power": "example",
      "product": {
        "capabilities": {},
        "company": "example",
        "identifier": "example",
        "name": "example"
      },
      "seconds_since_seen": 1,
      "selector": "example",
      "uuid": "example"
    }
  ]
}

List scenes

List the scenes saved on the LIFX account.

Inputs

None.

Outputs

datalist
The response from LIFX.
Example output
{
  "data": [
    {
      "account": {
        "uuid": "example"
      },
      "created_at": 1,
      "name": "example",
      "states": [
        {}
      ],
      "updated_at": 1,
      "uuid": "example"
    }
  ]
}

Pulse lights

Flash the lights quickly to a color and back.

Inputs

LightsselectortextRequired
Which lights to pulse: pick from the list, or type a LIFX selector such as all, id:d073d5000000, group_id:..., location_id:... or label:Desk lamp. Separate up to 25 with commas.
ColorcolortextRequired
The color to flash to, such as red, #ff0000, kelvin:2700 or hue:120 saturation:1.
From colorfrom_colortext
The color to start from. Leave blank to start from the light's current color.
Periodperiodnumber
How many seconds one cycle takes. LIFX uses 1 if left blank.At least 0.
Cyclescyclesnumber
How many times to repeat. LIFX uses 1 if left blank.At least 0.
Persistpersisttrue/false
Leave the lights on the effect's last color. Off by default, which puts them back as they were.
Power onpower_ontrue/false
Turn on lights that are off for the effect. On by default.

Outputs

dataobject
The response from LIFX.
Example output
{
  "data": {
    "not_ok_count": 1,
    "ok_count": 1,
    "results": [
      {
        "id": "example",
        "label": "example",
        "status": "example"
      }
    ],
    "summary": "example"
  }
}

Set lights

Turn lights on or off, or change their color or brightness. Anything left blank stays as it is.

Inputs

LightsselectortextRequired
Which lights to change: pick from the list, or type a LIFX selector such as all, id:d073d5000000, group_id:..., location_id:... or label:Desk lamp. Separate up to 25 with commas.
Powerpowertext
Turn the lights on or off.One of: on, off.
Colorcolortext
The color, such as red, #ff0000, kelvin:2700 (warm white) or hue:120 saturation:1.
Brightnessbrightnessnumber
Brightness from 0 to 1, such as 0.5 for half. Overrides any brightness in the color.From 0 to 1.
Durationdurationnumber
How many seconds the change takes. LIFX uses 1 if left blank.From 0 to 3155760000.
Infraredinfrarednumber
Night vision brightness from 0 to 1, for LIFX lights with infrared.From 0 to 1.
Fastfasttrue/false
Send the change without checking the lights first or waiting for them to answer. Quicker, but the step can't say which lights changed.

Outputs

dataobject
The response from LIFX.
Example output
{
  "data": {
    "not_ok_count": 1,
    "ok_count": 1,
    "results": [
      {
        "id": "example",
        "label": "example",
        "status": "example"
      }
    ],
    "summary": "example"
  }
}

Stop effects

Stop any breathe, pulse or firmware effect running on the lights.

Inputs

LightsselectortextRequired
Which lights to stop effects on: pick from the list, or type a LIFX selector such as all, id:d073d5000000, group_id:..., location_id:... or label:Desk lamp. Separate up to 25 with commas.
Power offpower_offtrue/false
Also turn the lights off.

Outputs

dataobject
The response from LIFX.
Example output
{
  "data": {
    "not_ok_count": 1,
    "ok_count": 1,
    "results": [
      {
        "id": "example",
        "label": "example",
        "status": "example"
      }
    ],
    "summary": "example"
  }
}

Toggle lights on or off

Turn the lights off if any of them are on, or on if they are all off.

Inputs

LightsselectortextRequired
Which lights to toggle: pick from the list, or type a LIFX selector such as all, id:d073d5000000, group_id:..., location_id:... or label:Desk lamp. Separate up to 25 with commas.
Durationdurationnumber
How many seconds the change takes. LIFX uses 1 if left blank.From 0 to 3155760000.

Outputs

dataobject
The response from LIFX.
Example output
{
  "data": {
    "not_ok_count": 1,
    "ok_count": 1,
    "results": [
      {
        "id": "example",
        "label": "example",
        "status": "example"
      }
    ],
    "summary": "example"
  }
}

On this page