Sky effect
Use this action to animate a sky scene across a LIFX Ceiling, Luna, Mirror, E26 Candle, or E26 Tube. The effect runs on the light itself, so it keeps going even if Home Assistant restarts. You can choose between three sky types, Clouds, Sunrise, and Sunset, and the default speed and colors for each one match the LIFX smartphone app.
The LIFX app presents these as three separate effects. In Home Assistant, they are one action, and you pick between them with the Sky type option.
This is a good way to start the day with a slow sunrise in the bedroom, wind down with a sunset in the evening, or keep a gentle cloud animation running in the background. If your target includes LIFX lights that are not matrix lights, those lights are left as they are.
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 Sky 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 Sky effect.
- Select what you want to control. Under By target (see Targets), pick the area your light is in (like your living room or bedroom). You can also select a floor, a device, a specific entity, or a label.
- In Sky type, choose the sky you want to animate, then set Speed to control how long the animation takes.
- Select Save.
Options in the UI
Turn the light on before the effect starts. This is on by default. Turn it off to leave a light that is already off untouched.
For the Sunrise and Sunset sky types, how long the effect takes to complete, in seconds. For the Clouds sky type, how fast the clouds move across the light. Accepts 1 to 86400 seconds, and defaults to 50.
The style of sky to animate. Choose Clouds, Sunrise, or Sunset. Defaults to Clouds.
The minimum cloud saturation for the Clouds sky type, from 0 to 255. Defaults to 50.
The maximum cloud saturation for the Clouds sky type, from 0 to 255. Defaults to 180.
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_sky. A basic example looks like this:
action: lifx.effect_sky
target:
entity_id: light.lifx_ceiling
data:
sky_type: Sunrise
speed: 600
This runs a ten-minute sunrise across the LIFX Ceiling light.
Options in YAML
Turn the light on before the effect starts. Set to false to leave a light that is already off untouched.
For the Sunrise and Sunset sky types, how long the effect takes to complete, in seconds. For the Clouds sky type, how fast the clouds move across the light. Accepts 1 to 86400 seconds.
The style of sky to animate. One of Clouds, Sunrise, or Sunset.
The minimum cloud saturation for the Clouds sky type, from 0 to 255.
The maximum cloud saturation for the Clouds sky type, from 0 to 255.
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
- The Sky effect needs a matrix light running firmware 4 or later. The LIFX Ceiling, Luna, Mirror, E26 Candle, and E26 Tube ship with it. Matrix lights still on firmware 3, such as the E12 Candle, do not support the effect. LIFX lights that are not matrix lights are skipped without an error, so you can point this action at an area that also holds other lights. A matrix light on firmware 3, however, makes the whole action fail, so leave those lights out of the target.
- How much detail you see depends on the light. The Clouds sky type spreads a pattern across the pixels, so it looks most detailed on a light with many of them, like the Ceiling. On a light with only a handful of zones, such as the Path, you still get a blue sky with lighter shapes drifting past, just a coarser one. The Sunrise and Sunset sky types shift color over time instead, so they look much the same on any supported light.
- In the Effect option of the Turn on a light action, Sky is currently offered on LIFX Ceiling lights only. On the other supported lights, use this action instead.
- 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_sky include no LIFX light”. If they include LIFX lights but no matrix light, it fails with “The targets of action lifx.effect_sky include no LIFX matrix light”. When you target an area, floor, device, or label instead, lights the effect cannot run on are left alone and no error is returned.
- The palette is shared between all three sky types. It takes 1 to 6 colors, which are used in this order:
- Sky: the background sky color for the Clouds sky type.
- Night sky: the starting or finishing color of the sky when no sun is visible, for the Sunrise and Sunset sky types.
- Dawn sky: the color of the sky just as the sun appears.
- Dawn sun: the color of the sun just as it appears.
- Full sun: the color of the sun as it covers the whole light.
- Final sun: the color of the full sun at the end of the effect.
- Each palette color is a list of four numbers in the order hue, saturation, brightness, Kelvin. A saturation or brightness of 1 or less is read as a fraction, so
0.5and50both mean 50%, and1means 100%, not 1%. - To stop the animation, use the Stop effect action. The light goes back to the color and power state it had before the effect started.
- Because the effect runs in the light’s firmware, it keeps running until you stop it, turn the light off, or start a different effect.
- You can also start this effect with default options by calling Turn on a light with the effect set to
effect_sky.
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: wake up to a slow sunrise
Start a 15-minute sunrise on the bedroom ceiling light in the morning, so the room brightens gradually before your alarm goes off.
- Trigger: Time: 06:15
-
Action: Sky effect
-
Target: Bedroom ceiling (
light.bedroom_ceiling) - Sky type: Sunrise
- Speed: 900
-
Target: Bedroom ceiling (
alias: "Wake up to a sunrise on the bedroom ceiling"
triggers:
- trigger: time
at: "06:15:00"
actions:
- action: lifx.effect_sky
target:
entity_id: light.bedroom_ceiling
data:
sky_type: Sunrise
speed: 900
Automation: run a sunset in the living room when the sun goes down
When the sun sets, animate a matching sunset across the living room ceiling light over half an hour.
- Trigger: Sun: sunset
-
Action: Sky effect
-
Target: Living room ceiling (
light.living_room_ceiling) - Sky type: Sunset
- Speed: 1800
-
Target: Living room ceiling (
alias: "Run a sunset in the living room at sundown"
triggers:
- trigger: sun
event: sunset
actions:
- action: lifx.effect_sky
target:
entity_id: light.living_room_ceiling
data:
sky_type: Sunset
speed: 1800
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:
-
Morph effect: Start the firmware-based Morph effect on a matrix LIFX light, such as the LIFX Tile or Candle.
-
Flame effect: Start the firmware-based Flame effect on a matrix LIFX light, such as the LIFX Tile or Candle.
-
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.