Paint theme
Use this action to paint a set of colors across one or more LIFX lights in a single step. You pick one of the predefined themes, or supply your own palette of 2 to 16 colors. Unlike the effect actions, it paints a still arrangement of colors, and the lights hold it until something else changes them.
This works well for setting a mood in a room, decorating for a holiday, or giving a group of lights a coordinated look without picking a color for each one. Lights that have several zones, such as LIFX Z, Lightstrip, Beam, Tile, and Candle, show the most of a theme, because the colors are spread across the zones of the light.
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 paint a theme 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 Paint theme.
- 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.
- Pick a value in Theme, or fill in Palette with your own colors. Use Transition to control how long the change takes.
- Select Save.
Options in the UI
Your own list of 2 to 16 colors to paint across the target lights, each defined as hue (0 to 360), saturation (0 to 100), brightness (0 to 100), and Kelvin (1500 to 9000). Use this instead of a theme, not alongside one.
A predefined color theme to paint. Use this instead of a palette, not alongside one. Defaults to exciting.
How long the change takes, in seconds. Accepts a whole number between 0 and 3600, and defaults to 1.
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.paint_theme. A basic example looks like this:
action: lifx.paint_theme
target:
entity_id: light.living_room
data:
theme: halloween
transition: 2
This paints the halloween theme across the living room lights over two seconds.
Options in YAML
Your own list of 2 to 16 colors to paint across the target lights, each defined as hue (0 to 360), saturation (0 to 100), brightness (0 to 100), and Kelvin (1500 to 9000). Can’t be combined with a theme.
A predefined color theme to paint. Can’t be combined with a palette. If you provide neither, the exciting theme is used.
How long the change takes, in seconds. Accepts a whole number between 0 and 3600.
Available themes
The Themes section of the LIFX integration page lists every theme by category, along with the renamed and retired themes and their replacements.
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 works with every LIFX light, not just the ones that support firmware effects. 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.paint_theme 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.
-
Palette and Theme are mutually exclusive. Setting both is rejected. If you set neither, the
excitingtheme is used. - Each palette color is a list of four numbers in the order hue, saturation, brightness, Kelvin. A palette needs at least 2 and at most 16 colors. A saturation or brightness of 1 or less is read as a fraction, so
0.5and50both mean 50%, and1means 100%, not 1%. - Painting a theme is not an animation, so there is nothing to stop afterwards. To clear a running firmware effect first, use the Stop effect action.
- Every paint arranges the colors at random, even when you paint the same theme again. If you repaint a theme over and over with a long transition, the light drifts slowly from one arrangement to the next and looks animated. The action returns as soon as the colors are sent, so wait for the transition to finish before painting again. For an example, refer to slowly drift through a theme.
- The same themes are also available on the Move effect and the Morph effect, and from the theme selector on the device page.
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: paint a warm theme in the living room at sunset
When the sun sets, ease the living room lights into the warming theme over ten seconds so the room shifts to an evening mood on its own.
- Trigger: Sun: sunset
-
Action: Paint theme
-
Target: Living room (
light.living_room) - Theme: warming
- Transition: 10
-
Target: Living room (
alias: "Paint a warm theme in the living room at sunset"
triggers:
- trigger: sun
event: sunset
actions:
- action: lifx.paint_theme
target:
entity_id: light.living_room
data:
theme: warming
transition: 10
Automation: welcome someone home with a custom palette
When a person arrives home, paint your own two-color palette across the hallway lights and send a notification to your phone.
- Trigger: Person enters the Home zone
-
Action: Paint theme
-
Target: Hallway (
light.hallway)
-
Target: Hallway (
-
Action: Send a notification message
-
Target: My Device (
notify.my_device)
-
Target: My Device (
alias: "Welcome home lighting in the hallway"
triggers:
- trigger: zone
entity_id: person.me
zone: zone.home
event: enter
actions:
- action: lifx.paint_theme
target:
entity_id: light.hallway
data:
palette:
- [30, 70, 80, 3000]
- [200, 60, 60, 4000]
transition: 3
- action: notify.send_message
target:
entity_id: notify.my_device
data:
message: >
Welcome home. The hallway lights are on.
Automation: slowly drift through a theme in the evening
At sunset, repaint the tranquil theme across the living room strip every minute with a one-minute transition, until the strip is turned off. Each paint arranges the colors differently, so the strip drifts slowly from one arrangement to the next.
- Trigger: Sun: sunset
-
Action: Repeat while the strip is on
-
Action: Paint theme
-
Target: Living room strip (
light.living_room_strip) - Theme: tranquil
- Transition: 60
-
Target: Living room strip (
- Action: Delay of 60 seconds
-
Action: Paint theme
alias: "Drift through a theme on the living room strip"
triggers:
- trigger: sun
event: sunset
actions:
- repeat:
while:
- condition: state
entity_id: light.living_room_strip
state: "on"
sequence:
- action: lifx.paint_theme
target:
entity_id: light.living_room_strip
data:
theme: tranquil
transition: 60
power_on: false
- delay:
seconds: 60
Setting Power on to false means the loop never switches the strip back on after someone turns it off, and the next check ends the loop.
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.
-
Move effect: Start the firmware-based Move effect on a multizone LIFX light, such as the LIFX Z, Lightstrip, or Beam.
-
Set state: Change the color, brightness, and power of a LIFX light in a single step.
-
Stop effect: Stop a running effect on LIFX lights.