Turn on a light

The Turn on action turns a light on. You can simply switch it on, or go further and set the brightness, color, color temperature, or an effect at the same time.

This action works with any light 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] in Home Assistant, whether it’s a single bulb, a group of lights, or a smart fixture. If the light is already on, calling the action updates its attributes (such as brightness or color) without flashing off first.

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 turn a light on from an automation or a script:

  1. Go to Settings > Automations & scenes.
  2. Open an existing automation or script, or select Create to start a new one.
  3. 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.
  4. In the Then do section, select Add action.
  5. From the search box, search for and select Light: Turn on.
  6. Under Targets, choose what you want to turn on:
    • To turn on a specific light, select the entity.
    • To turn on every light in a room, select an area.
    • To turn on every light on a floor, select a floor.
    • To turn on lights sharing a tag, select a label.
  7. Optional: under Advanced options, set the brightness, color, color temperature, or transition.
  8. Select Save.

Options in the UI

Transition (Optional)

How long, in seconds, it takes to get to the next state. Use this for a smooth fade instead of switching instantly.

Brightness (Optional)

How bright the light should be, on a scale from 0 (off) to 255 (brightest).

Brightness percentage (Optional)

How bright the light should be, from 0% (off) to 100% (brightest).

Color (Optional)

A color for the light. You can pick a named color, a color from the color wheel, or a specific value in RGB, hue/sat, or XY format.

Color temperature (Optional)

Warm or cool white, measured in Kelvin. Lower is warmer (more yellow), higher is cooler (more blue).

Effect (Optional)

A light effect to play, for example a color loop or a candle flicker. Available effects depend on the light.

Flash (Optional)

Ask the light to flash briefly, either short or long. Useful as a visual notification.

Profile (Optional)

The name of a light profile to apply. Profiles bundle a brightness and color together under a single name.

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 light.turn_on. A basic example looks like this:

ActionActions are used in several places in Home Assistant. As part of a script or automation, actions define what is going to happen once a trigger is activated. In scripts, an action is called *sequence*. [Learn more]
action: light.turn_on
target:
  entity_id: light.kitchen

This turns on light.kitchen at its previous brightness and color.

Options in YAML

YAML sometimes provides additional options for more complex use cases that are not available through the UI.

transition integer

Duration, in seconds, it takes to get to the next state. Use this to fade smoothly instead of switching instantly.

brightness integer

Number indicating brightness, where 0 turns the light off, 1 is the minimum brightness, and 255 is the maximum brightness.

brightness_pct integer

Number indicating the percentage of full brightness, where 0 turns the light off, 1 is the minimum brightness, and 100 is the maximum brightness.

color_name string

A human-readable color name, for example warm_white, tomato, or cornflowerblue.

color_temp_kelvin integer

Color temperature in Kelvin. Lower values are warmer (more yellow), higher values are cooler (more blue).

rgb_color list

The color in RGB format. A list of three integers between 0 and 255 representing the values of red, green, and blue.

hs_color list

Color in hue/sat format. A list of two integers, where hue is 0 to 360 and saturation is 0 to 100.

xy_color list

Color in XY format. A list of two decimal numbers between 0 and 1.

effect string

Light effect to apply. Available effects depend on the specific light.

flash string

Tell the light to flash briefly. Accepts either short or long.

profile string

Name of a light profile to apply.

Targets

This action supports targets. A target tells Home Assistant what the action should act on. You can point it 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 runs 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 mix target types in one call. For example, combine a specific entity with an area to run the action on both at once.

Good to know

  • The Turn on action works on any light 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], such as bulbs, groups, fixtures, or strips.
  • If the light is already on, the call updates its attributes (brightness, color) without flashing off first.
  • Not every light supports every field. A bulb that only dims ignores color fields, and a color-only light ignores color temperature. Home Assistant quietly skips fields the device can’t handle.
  • To reverse this action, use Turn off a light. To flip a light between on and off with a single call, use Toggle a light.

Try it yourself

Ready to test this? Open Developer 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.

Tip

You don’t need to edit YAML to use these examples. Copy a YAML snippet from this page, open the 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.

Action: set a cozy warm white tone

When you start winding down in the evening, dim the kitchen light to a warm white tone.

  • Action: Light: Turn on
  • Target: Kitchen light
  • Brightness percentage: 80
  • Color: warm_white
YAML example for a cozy warm white scene
ActionActions are used in several places in Home Assistant. As part of a script or automation, actions define what is going to happen once a trigger is activated. In scripts, an action is called *sequence*. [Learn more]
action: light.turn_on
target:
  entity_id: light.kitchen
data:
  brightness_pct: 80
  color_name: warm_white

Action: fade the bedroom light up over ten seconds

A long transition is a gentle way to wake up. Instead of snapping the light on, fade it up slowly.

  • Action: Light: Turn on
  • Target: Bedroom light
  • Brightness percentage: 100
  • Transition: 10 seconds
YAML example for a sunrise-style fade-in
ActionActions are used in several places in Home Assistant. As part of a script or automation, actions define what is going to happen once a trigger is activated. In scripts, an action is called *sequence*. [Learn more]
action: light.turn_on
target:
  entity_id: light.bedroom
data:
  brightness_pct: 100
  transition: 10

Action: turn on every light in a room

Target an area instead of a specific entity and Home Assistant resolves it to every light inside the room.

  • Action: Light: Turn on
  • Target: Living room
  • Brightness percentage: 60
YAML example for turning on every light in a room
ActionActions are used in several places in Home Assistant. As part of a script or automation, actions define what is going to happen once a trigger is activated. In scripts, an action is called *sequence*. [Learn more]
action: light.turn_on
target:
  area_id: living_room
data:
  brightness_pct: 60

Automation: porch light at sunset

Greet the evening by turning the porch light on at a warm white tone as the sun drops below the horizon. Nice and welcoming without running the light at full power.

  • Trigger: Sun: Below horizon
  • Action: Light: Turn on
  • Target: Porch light
  • Brightness percentage: 60
  • Color: warm_white
YAML example for a sunset porch light automation
AutomationAutomations in Home Assistant allow you to automatically respond to things that happen in and around your home. [Learn more]
alias: "Porch light at sunset"
triggers:
  - trigger: sun
    event: sunset
actions:
  - action: light.turn_on
    target:
      entity_id: light.porch
    data:
      brightness_pct: 60
      color_name: warm_white

Automation: gentle weekday wake-up

Fade the bedroom light up over ten seconds at 7 in the morning on weekdays. A kinder way to start the day than a sudden flick.

  • Trigger: Time: 07:00
  • Condition: Day of the week is Monday to Friday
  • Action: Light: Turn on
  • Target: Bedroom light
  • Brightness percentage: 100
  • Transition: 10 seconds
YAML example for a weekday sunrise alarm
AutomationAutomations in Home Assistant allow you to automatically respond to things that happen in and around your home. [Learn more]
alias: "Gentle weekday wake-up"
triggers:
  - trigger: time
    at: "07:00:00"
conditions:
  - condition: time
    weekday:
      - mon
      - tue
      - wed
      - thu
      - fri
actions:
  - action: light.turn_on
    target:
      entity_id: light.bedroom
    data:
      brightness_pct: 100
      transition: 10

Automation: welcome home lighting

When you arrive home after dark, turn on every light in the living room at a comfortable level so the house greets you instead of leaving you fumbling for switches.

  • Trigger: Person: Paulus changes to home
  • Condition: Sun is below horizon
  • Action: Light: Turn on
  • Target: Living room
  • Brightness percentage: 60
YAML example for welcome home lighting
AutomationAutomations in Home Assistant allow you to automatically respond to things that happen in and around your home. [Learn more]
alias: "Welcome home lighting"
triggers:
  - trigger: state
    entity_id: person.paulus
    to: home
conditions:
  - condition: sun
    after: sunset
actions:
  - action: light.turn_on
    target:
      area_id: living_room
    data:
      brightness_pct: 60

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.

Tip

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

These actions work well alongside this one:

  • Turn off a light - Turn a light off. Optionally fade it out with a transition, or have it flash briefly before it goes dark.

  • Toggle a light - Flip a light between on and off. If it’s off, it turns on. If it’s on, it turns off.