Color sweep effect
Use this action to start the firmware-based Color Sweep effect on a LIFX Mirror. While the LIFX app does not list it as an effect, it is the factory default action for the FX button, which the app calls Makeup Check. With this action, you can start it without pressing a button and change how it runs. The default options match the FX button. The Mirror sweeps once across the color temperature range, from 1500 to 6500 Kelvin, over 30 seconds. This lets you see how your makeup looks under different kinds of light. You can also give it your own palette of colors to sweep through.
The Color Sweep effect runs on the Mirror itself, so it keeps going even if Home Assistant restarts. To stop it early, use Stop effect.
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 start the Color Sweep 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 sweep effect.
- Select what you want to control. Under By target (see Targets), pick your LIFX Mirror, or the area it is in (like your bathroom or bedroom). You can also select a floor, a device, a specific entity, or a label.
- Optional: set Speed to control how long each sweep takes, Duration to control how long the effect runs, and Palette to choose the colors it sweeps through.
- Select Save.
Options in the UI
How long, in seconds, one sweep through the palette takes. Choose a whole number between 0 and 25. At 0, which is the default, the Mirror sweeps once across the whole duration, which then has to be above 0.
How long, in seconds, the effect runs. Choose a whole number between 0 and 3600. Defaults to 30 seconds. At 0, the effect runs until you stop it, which needs a Speed above 0.
A list of 2 to 16 colors to sweep through, each as hue (0-360), saturation (0-100), brightness (0-100), and Kelvin (1500-9000). Defaults to full-brightness white at 1500 Kelvin and at 6500 Kelvin, which sweeps across the color temperature range.
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. For how an automation or a script is built in YAML, refer to Automations in YAML and Scripts.
In YAML, refer to this action as lifx.effect_colorsweep. A basic example looks like this:
action: lifx.effect_colorsweep
target:
entity_id: light.bathroom_mirror
data:
duration: 60
This sweeps the bathroom Mirror once across the color temperature range, taking one minute.
Options in YAML
How long, in seconds, one sweep through the palette takes. Accepts a whole number between 0 and 25. At 0, the Mirror sweeps once across the whole duration, which then has to be above 0.
How long, in seconds, the effect runs. Accepts a whole number between 0 and 3600. At 0, the effect runs until you stop it, which needs a speed above 0.
A list of 2 to 16 colors to sweep through, each as [hue, saturation, brightness, kelvin], with hue from 0 to 360, saturation and brightness from 0 to 100, and Kelvin from 1500 to 9000.
[[0, 0, 100, 1500], [0, 0, 100, 6500]]
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.
To learn which entities Home Assistant includes for a device, area, floor, or label, and how it handles several entities, refer to Automation targets.
To leave out some of these entities, refer to Excluding targets. For example, you can leave out one light entity in an area.
Good to know
- Only the LIFX Mirror runs the Color Sweep effect. If your target also covers other LIFX lights, those lights are skipped and the rest of the action still runs.
- When you target lights by entity and none of them is a LIFX light, the action fails with the message “The targets of action lifx.effect_colorsweep include no LIFX light”. If they include LIFX lights but no Mirror, it fails with “The targets of action lifx.effect_colorsweep include no LIFX Mirror”. When you target an area, floor, device, or label instead, lights the effect cannot run on are left alone and no error is returned.
- With the default Speed of 0, the Mirror sweeps through the palette once, spread across the whole Duration. Set Speed above 0 to repeat the sweep instead, with each sweep taking that many seconds, until the duration is up. Speed 0 with a duration of 0 fails with an error, because the effect would otherwise run at a default speed instead.
- Power on is on by default, so a Mirror that is off is turned on before the effect starts.
- To stop the effect before the duration is up, use Stop effect.
- You can also start this effect with default options by calling Turn on a light with the effect set to
effect_colorsweep.
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.
Script: check your makeup under different light
Sweep the bathroom Mirror slowly across the color temperature range, so you can see how your makeup looks in both warm light and cool daylight.
-
Action: Color sweep effect
-
Target: Bathroom Mirror (
light.bathroom_mirror)
-
Target: Bathroom Mirror (
alias: "Makeup check"
sequence:
- action: lifx.effect_colorsweep
target:
entity_id: light.bathroom_mirror
data:
duration: 90
Automation: sweep through party colors
When the party scene is turned on, sweep the Mirror through a palette of bright colors. Each sweep takes five seconds, and the sweeps repeat until the effect is stopped.
- Trigger: The party scene is activated
-
Action: Color sweep effect
-
Target: Hallway Mirror (
light.hallway_mirror)
-
Target: Hallway Mirror (
alias: "Party colors on the Mirror"
triggers:
- trigger: state
entity_id: scene.party
actions:
- action: lifx.effect_colorsweep
target:
entity_id: light.hallway_mirror
data:
speed: 5
duration: 0
palette:
- [0, 100, 100, 3500]
- [120, 100, 100, 3500]
- [240, 100, 100, 3500]
Still stuck?
To test the action on its own, run it in the automation editor with Run action, and check the message that it shows. To see what the action did when the automation ran, open the trace of that run. For details, refer to Testing automations. For common problems and their solutions, refer to Troubleshooting automations.
If that doesn’t help, 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:
-
Morph effect: Start the firmware-based Morph effect on a matrix LIFX light, such as the LIFX Tile or Candle.
-
Sky effect: Start a firmware-based effect that animates a sky scene across a LIFX Ceiling, Luna, Mirror, E26 Candle, or E26 Tube.
-
Flame effect: Start the firmware-based Flame effect on a matrix LIFX light, such as the LIFX Tile or Candle.
-
Stop effect: Stop a running effect on LIFX lights.