Color loop effect
The Color loop effect action runs an effect with looping colors, moving each light steadily around the color wheel. It’s a nice fit for parties, holidays, or any time you want gentle, shifting color in a room.
This is a software effect, which means Home Assistant drives each color change over your network. It needs color-capable LIFX lights, so white-only models can’t run it. When you target more than one light, they coordinate so their colors stay related but not identical. The effect keeps running until you stop it.
Using this action from the user interface
If you prefer building automations and scripts visually, Home Assistant walks you through this action step by step. You pick what to target, tweak a few options, and save. No YAML knowledge required.
To run the color loop effect from an automation or a script:
- Go to Settings > Automations & scenes.
- Open an existing automation or script, or select Create automation > Create new automation.
- If you’re setting up a new automation, add a trigger in the When section. Scripts don’t need a trigger. They run when something else calls them.
- In the Then do section, select Add action.
- From the search box, search for and select Color loop effect.
- Select what you want to control. Under By target (see Targets), pick the area your LIFX lights are in (like your living room or bedroom). You can also select a floor, a device, a specific entity, or a label.
- Set Period to control how long one full trip around the color wheel takes.
- Optional: set Spread to control how different the colors of your lights are from each other, and Minimum saturation and Maximum saturation to control how vivid they get.
- Select Save.
Options in the UI
How bright the color loop is, from 0 to 255. Leave it out to keep each light’s current brightness.
An alternative to the brightness value, as a percentage from 0 to 100. Use either this or the brightness value, not both.
The lower bound for how vivid the colors are, as a percentage from 1 to 100. The effect uses the midpoint between the minimum and the maximum as a steady saturation, so lower values make the colors look paler. Defaults to 80.
The upper bound for how vivid the colors are, as a percentage from 1 to 100. Higher values make the colors look more vivid. Defaults to 100.
Accepted for compatibility with the other effects. It has no effect on the color loop, which fades continuously.
How long one full trip around the color wheel takes, in seconds. Accepts 0.05 to 3600 seconds. Shorter periods make the colors move faster. Defaults to 60 seconds.
How many degrees of the color wheel each update covers, from 0 to 360. Smaller values send more updates per loop. The effect always sends at least 20 updates per second, so on longer periods this option makes no visible difference. Defaults to 20.
How far apart the colors of your lights are, in degrees on a color wheel from 0 to 360. Each additional light is offset by this much. Use 0 to keep every light on the same color. Defaults to 30.
Using this action in YAML
If you work directly in YAML, or you want to know exactly what Home Assistant does under the hood, this section has the technical reference. It lists the field names you use in YAML, their types, and which ones are required.
In YAML, refer to this action as lifx.effect_colorloop. A basic example looks like this:
action: lifx.effect_colorloop
target:
entity_id: light.living_room
data:
brightness: 180
period: 10
This loops colors across the living room lights at a fixed brightness, taking 10 seconds for each full trip around the color wheel.
Options in YAML
How bright the color loop is, from 0 to 255. Leave it out to keep each light’s current brightness. Cannot be combined with brightness_pct.
An alternative to brightness, as a percentage from 0 to 100. Cannot be combined with brightness.
The lower bound for how vivid the colors are, as a percentage from 1 to 100. The effect uses the midpoint between the minimum and the maximum as a steady saturation, so lower values make the colors look paler.
The upper bound for how vivid the colors are, as a percentage from 1 to 100. Higher values make the colors look more vivid.
Accepted for compatibility with the other effects. It has no effect on the color loop, which fades continuously.
How long one full trip around the color wheel takes, in seconds. Accepts 0.05 to 3600 seconds, in steps of 0.05. Shorter periods make the colors move faster.
How many degrees of the color wheel each update covers, from 0 to 360. Smaller values send more updates per loop. The effect always sends at least 20 updates per second, so on longer periods this option makes no visible difference.
How far apart the colors of your lights are, in degrees on a color wheel from 0 to 360. Each additional light is offset by this much. Use 0 to keep every light on the same color.
Targets of the action
This action requires a target. The target is the object of the action. You can point the action at a single entityAn entity represents a sensor, actor, or function in Home Assistant. Entities are used to monitor physical properties or to control other entities. An entity is usually part of a device or a service. [Learn more], a device, an area, a floor, or a label, and Home Assistant will run the action on every matching light entity behind that target.
-
Entity: one specific light entity, such as
light.living_room. - Device: every light entity that belongs to a device.
- Area: every light entity in a room or area.
- Floor: every light entity on a floor.
- Label: every light entity that shares a label.
You can also select different target types in one action. For example, you can add a specific entity and an area as targets in the same action to run the action on both of them at once.
Good to know
- This action only works on lights that belong to the LIFX integrationIntegrations connect and integrate Home Assistant with your devices, services, and more. [Learn more]. When you target lights by entity and none of them is a LIFX light, Home Assistant reports an error: “The targets of action lifx.effect_colorloop include no LIFX light”. When you target an area, floor, device, or label that holds no LIFX light, nothing happens and no error is returned.
- The effect needs color-capable lights. White-only LIFX lights can run Pulse effect instead.
- The color loop runs until something stops it. Use Stop effect to end it, or turn the lights off.
- If you set the minimum saturation higher than the maximum, Home Assistant swaps the two values for you, so you only need to set one of them.
- Each time the effect starts, it picks a direction around the color wheel at random, so two runs of the same automation can move in opposite directions.
- Each light starts from the color it is showing when the effect starts, so the colors you see also depend on what the lights were doing beforehand.
- Because this is a software effect, Home Assistant sends each color change over your network. Long periods use less network traffic than very short ones.
- Starting a color loop replaces a software effect that’s already running on the same light, such as Pulse effect. It doesn’t clear a firmware effect such as Move, Flame, Morph, or Sky, so run Stop effect first if one of those is running.
- On multizone and matrix lights, the firmware effects Move effect and Morph effect run on the light itself and stay smooth even if Home Assistant restarts.
- You can also start this effect with its default options from the regular
light.turn_onaction by setting its effect toeffect_colorloop. Use this dedicated action when you want to control the speed, colors, or brightness.
Try it yourself
Ready to test this? Open Settings > Tools > Actions, search for this action, fill in the fields, and select Perform action. You see what happens on your actual entitiesAn entity represents a sensor, actor, or function in Home Assistant. Entities are used to monitor physical properties or to control other entities. An entity is usually part of a device or a service. [Learn more] without writing a line of YAML.
More examples
Real scenarios where this action shows up in automations and scripts. Copy any example and adapt it to your setup. In the visual editor, select the UI options listed in the example or paste the YAML code.
You don’t need to edit YAML to use these examples. Copy a YAML snippet from this page, open the visual automation editor in Home Assistant, and press Ctrl+V (or Cmd+V on Mac). Home Assistant automatically converts the pasted YAML into the visual editor format, whether it’s a full automation, a single trigger, a condition, or an action.
Automation: start a slow color loop at sunset
At sunset, start a slow, gentle color loop in the living room, and stop it again at 11 pm.
- Trigger: Sunset
-
Action: Color loop effect
-
Target: Living room lights (
light.living_room)
-
Target: Living room lights (
alias: "Color loop in the living room after sunset"
triggers:
- trigger: sun
event: sunset
id: "start"
- trigger: time
at: "23:00:00"
id: "stop"
actions:
- choose:
- conditions:
- condition: trigger
id: "start"
sequence:
- action: lifx.effect_colorloop
target:
entity_id: light.living_room
data:
brightness_pct: 60
period: 120
- conditions:
- condition: trigger
id: "stop"
sequence:
- action: lifx.effect_stop
target:
entity_id: light.living_room
Automation: celebrate when someone gets home
When you arrive home, run a fast color loop in the hallway for 30 seconds, then stop it.
-
Trigger: Person arrives home (
person.paulus) -
Action: Color loop effect
-
Target: Hallway light (
light.hallway)
-
Target: Hallway light (
-
Action: Stop effect
-
Target: Hallway light (
light.hallway)
-
Target: Hallway light (
alias: "Welcome home color loop"
triggers:
- trigger: state
entity_id: person.paulus
to: "home"
actions:
- action: lifx.effect_colorloop
target:
entity_id: light.hallway
data:
brightness_pct: 80
period: 2
- delay: "00:00:30"
- action: lifx.effect_stop
target:
entity_id: light.hallway
Still stuck?
The Home Assistant community is quick to help: join Discord for real-time chat, post on the community forum with the action you’re calling and what you expected to happen, or share on our subreddit /r/homeassistant.
AI assistants like ChatGPT or Claude can also explain actions or suggest the right one when you describe what you want in plain language.
Related actions
Explore related actions:
-
Pulse effect: Run a flash effect on LIFX lights by changing to a color and back.
-
Move effect: Start the firmware-based Move effect on a multizone LIFX light, such as the LIFX Z, Lightstrip, or Beam.
-
Paint theme: Paints either a provided theme or custom palette across one or more LIFX lights.
-
Stop effect: Stop a running effect on LIFX lights.