Light is off

The Light is off condition passes when a 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] is currently off. Use it to gate an automation so it only runs when a specific light (or every targeted light) is already dark.

When you target more than one light, the condition’s behavior option controls how the check combines results. You can require any targeted light to be off, or demand that all of them are.

Labs

Requires the Purpose-specific triggers and conditions Labs preview feature. Enable it at Settings > System > Labs.

Using this condition from the user interface

If you prefer building automations visually, Home Assistant walks you through this condition step by step. You pick what to check, tweak a few options, and save. No YAML knowledge required.

To use this condition in an automation:

  1. Go to Settings > Automations & scenes.
  2. Open an existing automation, or select Create automation > Create new automation.
  3. In the And if section, select Add condition.
  4. From the search box, search for and select Light: Light is off.
  5. Under Targets, select the light entity, an area, a floor, or a label.
  6. Under Condition passes if, pick Any or All.
  7. Select Save.

Options in the UI

Condition passes if (Required)

When multiple lights are targeted, controls how results combine. Pick Any to pass if at least one targeted light is off, or All to pass only when every targeted light is off.

Using this condition 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 condition as light.is_off. A basic example looks like this:

ConditionConditions are an optional part of an automation that will prevent an action from firing if they are not met. [Learn more]
condition: light.is_off
target:
  entity_id: light.bedroom

This passes when the bedroom light is currently off.

Options in YAML

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

behavior string Required, default: any

When multiple lights are targeted, controls how results combine. Accepts all or any.

Targets

This condition supports targets. A target tells Home Assistant what the condition should check. 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 evaluates 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 condition. For example, combine a specific entity with an area to check both at once.

Good to know

  • Lights that are unavailable (unavailable) or have an unknown state (unknown) do not count as off. With Any behavior, they are skipped. With All behavior, the condition fails if every targeted light is unavailable.
  • To gate an automation on a light being on instead, use Light is on.
  • Pair with the Light turned off trigger to react only when a transition to off happens.

Try it yourself

Ready to test this? Go to Settings > Automations & scenes, open an automation, and add this condition. Trigger the automation with and without the condition met, and watch whether it continues or stops.

More examples

Real scenarios where this condition gates an automation. 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.

Automation: only run the morning wake-up if the bedroom is still dark

At 07:00 on weekdays, start the morning wake-up routine, but only if the bedroom light is still off. Skip the routine on days you’re already awake.

  • Trigger: Time: 07:00
  • Condition: Day of the week is Monday to Friday
  • Condition: Light is off
  • Target: Bedroom light
  • Condition passes if: All
  • Action: Script: Morning wake-up
YAML example for a gated morning wake-up
AutomationAutomations in Home Assistant allow you to automatically respond to things that happen in and around your home. [Learn more]
alias: "Morning wake-up only if bedroom dark"
triggers:
  - trigger: time
    at: "07:00:00"
conditions:
  - condition: time
    weekday:
      - mon
      - tue
      - wed
      - thu
      - fri
  - condition: light.is_off
    target:
      entity_id: light.bedroom
    options:
      behavior: all
actions:
  - action: script.morning_wake_up

Still stuck?

The Home Assistant community is quick to help: join Discord for real-time chat, post on the community forum with the condition you’re using and what you expected to happen, or share on our subreddit /r/homeassistant.

Tip

AI assistants like ChatGPT or Claude can also explain conditions or suggest the right one when you describe what you want in plain language.

Related conditions

These conditions work well alongside this one: