Light brightness crossed threshold

The Light brightness crossed threshold trigger fires 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] crosses a specific brightness level. Use it to react to a light passing a particular value in either direction, like starting an automation only once brightness passes 50%.

Unlike Light brightness changed, which fires on any sizable change, this trigger only fires when the brightness moves across the exact threshold you pick. It fires once per crossing, in whichever direction.

Labs

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

Using this trigger from the user interface

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

To use this trigger in an automation:

  1. Go to Settings > Automations & scenes.
  2. Open an existing automation, or select Create automation > Create new automation.
  3. In the When section, select Add trigger.
  4. From the search box, search for and select Light: Light brightness crossed threshold.
  5. Under Targets, select the light entity, an area, a floor, or a label.
  6. Under Threshold type, set the brightness percentage you want the trigger to watch for.
  7. Under Trigger when, pick Any, First, or Last to control how multiple targets interact.
  8. Select Save.

Options in the UI

Threshold type (Required)

The brightness level the light has to cross for the trigger to fire. Expressed as a percentage of full brightness.

Trigger when (Required)

When multiple lights are targeted, controls when the trigger fires. Pick Any to fire every time any targeted light crosses the threshold, First to fire only on the first crossing, or Last to fire only after the last crossing.

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

TriggerA trigger is a set of values or conditions of a platform that are defined to cause an automation to run. [Learn more]
trigger: light.brightness_crossed_threshold
target:
  entity_id: light.living_room
options:
  threshold: 50
  behavior: any

This fires whenever the living room light crosses 50% brightness in either direction.

Options in YAML

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

threshold any Required

The brightness percentage the light has to cross for the trigger to fire. Accepts a number or a reference to an input_number, number, or sensor entity.

behavior string Required, default: any

When multiple lights are targeted, controls when the trigger fires. Accepts any, first, or last.

Targets

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

Good to know

  • The trigger fires on any crossing, up or down. If you only want one direction, gate the automation with a numeric condition that checks whether the light’s brightness is above or below the threshold.
  • The threshold is measured against the light’s brightness percentage. A light at 0% (off) and the same light at 1% are both below a 50% threshold.
  • Pair this trigger with Light is brightness in follow-up conditions to double-check the final state.

Try it yourself

Ready to test this? Go to Settings > Automations & scenes, create a new automation, and add this trigger. Save the automation, then change the state of the targeted entity to watch the trigger fire 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].

More examples

Real scenarios where this trigger fires 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.

Automation: start mood lighting when the ceiling light dims below 40%

When you dim the ceiling light below 40% in the evening, turn on the accent lighting so the room feels layered instead of dim.

  • Trigger: Light brightness crossed threshold
  • Target: Living room ceiling light
  • Threshold type: 40
  • Trigger when: Any
  • Condition: Sun is below horizon
  • Condition: Ceiling light brightness is below 40%
  • Action: Light: Turn on (accent lights)
YAML example for mood lighting on dim
AutomationAutomations in Home Assistant allow you to automatically respond to things that happen in and around your home. [Learn more]
alias: "Mood lighting on dim"
triggers:
  - trigger: light.brightness_crossed_threshold
    target:
      entity_id: light.living_room_ceiling
    options:
      threshold: 40
      behavior: any
conditions:
  - condition: sun
    after: sunset
  - condition: light.is_brightness
    target:
      entity_id: light.living_room_ceiling
    options:
      threshold: 40
      behavior: any
actions:
  - action: light.turn_on
    target:
      entity_id: light.living_room_accent
    data:
      brightness_pct: 60
      color_name: warm_white

Still stuck?

The Home Assistant community is quick to help: join Discord for real-time chat, post on the community forum with the trigger 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 triggers or suggest the right one when you describe what you want in plain language.

Related triggers

These triggers work well alongside this one: