Power crossed threshold
The Power crossed threshold trigger fires when a power reading crosses into or out of a threshold zone that you define. You can detect when a reading moves above a level, drops below a level, enters a range, or leaves a range.
Use Power crossed threshold when the crossing moment matters, such as when an appliance starts drawing noticeable power, when a washing machine finishes, or when a circuit load moves into a range that needs attention.
When you target more than one entity, the trigger’s Trigger when option controls when it fires.
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 Power crossed threshold in an automation:
- Go to Settings > Automations & scenes.
- Open an existing automation, or select Create automation > Create new automation.
- In the When section, select Add trigger.
- Select what you want to monitor. Under By target (see Targets), pick the area your power sensor is in. You can also select a device, a specific entity, or a label.
- From the triggers shown for that target, select Power crossed threshold.
- Under Threshold type, configure the zone the reading must cross for the trigger to fire:
- Select Above or Below and enter a value to fire when the reading crosses that level.
- Select In range and enter a lower and upper bound to fire when the reading enters the range from outside.
- Select Outside range and enter a lower and upper bound to fire when the reading leaves the range.
- For each option, you can enter a fixed power value, pick a sensor or number entity, or pick a user-created number helper as the threshold.
- Under Trigger when (see Behavior), choose how multiple targeted sensors should behave. The default is Each.
- Under For at least, set how long the reading must stay past the threshold before the trigger fires. Leave it at zero to fire immediately.
- Select Save.
Options in the UI
Controls which threshold crossings fire the trigger:
- Above (exclusive): fires when the reading crosses to strictly above the threshold. A reading equal to the threshold does not trigger a crossing.
- Below (exclusive): fires when the reading crosses to strictly below the threshold. A reading equal to the threshold does not trigger a crossing.
- In range (exclusive): fires when the reading crosses into the range. A reading equal to either bound is not considered inside the range.
- Outside range (inclusive): fires when the reading crosses out of the range. A reading equal to either bound is considered outside the range.
For each mode you can enter a fixed power value or reference a sensor entity, a number entity, or a user-created number helper.
When multiple entities are targeted, controls when the trigger fires:
- Each: fires every time any targeted entity crosses the threshold.
- First: fires only on the first crossing.
- All: fires only after every targeted entity crosses the threshold.
This corresponds to the behavior field in YAML. Default is Each.
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, Power crossed threshold is referred to as power.crossed_threshold. A basic example looks like this:
trigger: power.crossed_threshold
target:
entity_id: sensor.washing_machine_power
options:
threshold:
type: below
value:
number: 3
unit_of_measurement: "W"
This fires whenever the washing machine power reading crosses below 3 W.
To fire when a reading leaves a normal operating range:
trigger: power.crossed_threshold
target:
entity_id: sensor.main_power
options:
threshold:
type: outside
value_min:
number: 500
unit_of_measurement: "W"
value_max:
number: 3500
unit_of_measurement: "W"
This fires whenever the main power reading crosses outside the 500 W to 3500 W range.
To use a user-created helperA helper is a virtual entity you create inside Home Assistant. It is not backed by a physical device. Helpers store values, track state, or do calculations that your automations and dashboards need. [Learn more] as a dynamic threshold that you can adjust without editing the automation:
trigger: power.crossed_threshold
target:
entity_id: sensor.ev_charger_power
options:
threshold:
type: above
value:
entity: input_number.high_power_alert_threshold
behavior: first
Options in YAML
YAML sometimes provides additional options for more complex use cases that are not available through the UI.
A mapping that defines the threshold crossing that fires the trigger:
-
type: above(exclusive): Sets a minimum. Fires when the reading crosses to strictly abovevalue. A reading equal tovaluedoes not trigger a crossing. Providevaluewith either anumberandunit_of_measurement(for a literal power value) or anentitykey (for aninput_number,number, orsensorentity). -
type: below(exclusive): Sets a maximum. Fires when the reading crosses to strictly belowvalue. A reading equal tovaluedoes not trigger a crossing. Providevaluewith either anumberandunit_of_measurement(for a literal power value) or anentitykey (for aninput_number,number, orsensorentity). -
type: between(exclusive): Defines a range. Fires when the reading crosses into the range. A reading equal to either bound is not inside the range. Providevalue_minandvalue_max, each with either anumberandunit_of_measurement(for a literal power value) or anentitykey (for aninput_number,number, orsensorentity). -
type: outside(inclusive): Defines an outside-range. Fires when the reading crosses out of the range. A reading equal to either bound is outside the range. Providevalue_minandvalue_max, each with either anumberandunit_of_measurement(for a literal power value) or anentitykey (for aninput_number,number, orsensorentity).
When you use a literal number, add unit_of_measurement with one of the supported power units.
Supported units are mW, W, kW, MW, GW, TW, and BTU/h.
When multiple entities are targeted, controls when the trigger fires:
-
each: fires every time any targeted entity crosses the threshold. -
first: fires only on the first threshold crossing. -
all: fires only after every targeted entity crosses the threshold.
Targets of the trigger
This trigger requires a target. The target is the object that Home Assistant will watch. You can select 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 as a target, and Home Assistant will watch every matching power entity behind that target.
-
Entity: one specific power entity, such as
power.living_room. - Device: every power entity that belongs to a device.
- Area: every power entity in a room or area.
- Floor: every power entity on a floor.
- Label: every power entity that shares a label.
You can also select different target types in one trigger. For example, you can add a specific entity and an area as targets in the same trigger to monitor both of them at once.
Behavior with multiple targets
When you target more than one entity (or select an area, floor, or label that contains several), the Trigger when option controls how the trigger responds:
- Each (default): the trigger fires every time any one of the targeted entities transitions. For example, if you monitor three motion sensors in the living room and someone walks past sensor 1, the automation fires. When they walk past sensor 2 a moment later, it fires again. Every individual event counts.
- First: the trigger fires only on the first transition in the targeted group, then waits until all targeted entities have reset before it fires again. For example, if you monitor the same three motion sensors, the automation fires when the first one picks up movement (someone entered the room). The other two firing afterward are ignored, so you get one notification per “someone walked in” event instead of three.
- All: the trigger fires only after the last targeted entity in the group has fired, meaning all of them are now in the expected state. For example, if you monitor the lights in the living room, bedroom, and hallway, the automation fires only once all three have turned off. This is useful for scenarios like “start the robot vacuum only after every light on the floor is off,” so you know the room is truly empty.
Good to know
- Use Power crossed threshold when you care about the moment a reading crosses a level or range boundary. If you want to react to every matching reading change instead, use Power changed.
- Supported thresholds can use fixed values, a sensor with the power device class, a number entity with the power device class, or a user-created helperA helper is a virtual entity you create inside Home Assistant. It is not backed by a physical device. Helpers store values, track state, or do calculations that your automations and dashboards need. [Learn more] from the Input number integration.
- Supported power units are
mW,W,kW,MW,GW,TW, andBTU/h. - If a targeted entity is
unknownorunavailable, it cannot contribute to the trigger until it reports a valid power value again. - This trigger works with sensors that have the power device class.
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.
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: notify when the washing machine finishes
When the washing machine power crosses below 3 W and stays there for 5 minutes, send a notification so you know the cycle is done.
-
Trigger: Power crossed threshold
- Target: Washing machine power sensor
- Threshold type: Below 3 W
- For at least: 00:05:00
-
Action: Send a notification message
-
Target: My Device (
notify.my_device)
-
Target: My Device (
YAML example for a washing machine finished notification
alias: "Notify when the washing machine finishes"
triggers:
- trigger: power.crossed_threshold
target:
entity_id: sensor.washing_machine_power
options:
threshold:
type: below
value:
number: 3
unit_of_measurement: "W"
for: "00:05:00"
actions:
- action: notify.send_message
target:
entity_id: notify.my_device
data:
message: "The washing machine cycle is finished."
Automation: turn on a warning light when a heater starts drawing high power
When a space heater power reading crosses above 1500 W, turn on a warning light so the load is easy to notice.
-
Trigger: Power crossed threshold
- Target: Space heater power sensor
- Threshold type: Above 1500 W
-
Action: Turn on light
- Target: light.high_load_warning
YAML example for a high-load heater warning
alias: "Turn on warning light when heater power gets high"
triggers:
- trigger: power.crossed_threshold
target:
entity_id: sensor.space_heater_power
options:
threshold:
type: above
value:
number: 1500
unit_of_measurement: "W"
actions:
- action: light.turn_on
target:
entity_id: light.high_load_warning
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.
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:
- Power changed: Triggers after one or more power values change.