Power changed
The Power changed trigger fires when a power reading changes and the new value matches the threshold you set. You can react to any change, only when the new reading is above or below a limit, or only when it lands inside or outside a range.
Use Power changed when you want to react to the latest power reading right away, such as noticing when an appliance starts drawing noticeable power or when a circuit moves outside its normal operating range.
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 changed 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 changed.
- Under Threshold type, configure what kind of change fires the trigger:
- Select Any change to fire on any power change.
- Select Above or Below and enter a value to fire only when the new reading is above or below that value.
- Select In range and enter a lower and upper bound to fire only when the new reading falls inside the range.
- Select Outside range and enter a lower and upper bound to fire only when the new reading falls outside 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.
- Select Save.
Options in the UI
Controls which changes fire the trigger:
- Any change: fires on any change, regardless of direction or new value.
- Above or Below (exclusive): fires only when the new reading is strictly above or below the threshold. A reading equal to the threshold does not fire the trigger.
- In range (exclusive): fires only when the new reading is strictly between the two bounds. A reading equal to either bound does not fire the trigger.
- Outside range (inclusive): fires when the new reading is at or below the lower bound, or at or above the upper bound. A reading equal to either bound fires the trigger.
For each mode you can enter a fixed power value or reference a sensor entity, a number entity, or a user-created number helper.
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 changed is referred to as power.changed. A basic example looks like this:
trigger: power.changed
target:
entity_id: sensor.washing_machine_power
options:
threshold:
type: above
value:
number: 10
unit_of_measurement: "W"
This fires whenever the washing machine power reading changes to a value above 10 W. To fire on any change regardless of direction or value, use type: any and omit value.
To fire only when the new reading lands inside a normal operating range:
trigger: power.changed
target:
entity_id: sensor.server_rack_power
options:
threshold:
type: between
value_min:
number: 150
unit_of_measurement: "W"
value_max:
number: 350
unit_of_measurement: "W"
This fires whenever the server rack power reading changes to a value between 150 W and 350 W.
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.changed
target:
entity_id: sensor.oven_power
options:
threshold:
type: above
value:
entity: input_number.high_power_alert_threshold
Options in YAML
YAML sometimes provides additional options for more complex use cases that are not available through the UI.
A mapping that defines which kind of change fires the trigger:
-
type: any: Fires on any power change (no additional keys needed). -
type: above(exclusive): Sets a minimum. Fires when the new reading is strictly abovevalue. A reading equal tovaluedoes not fire the trigger. 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 new reading is strictly belowvalue. A reading equal tovaluedoes not fire the trigger. 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 new reading is strictly betweenvalue_minandvalue_max. Readings equal to either bound do not fire the trigger. 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 new reading is at or belowvalue_min, or at or abovevalue_max. Readings equal to either bound fire the trigger. 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.
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.
Good to know
- Use Power changed when you want to react to the latest reading after it changes. If you need to react only when a reading crosses into or out of a threshold zone, use Power crossed threshold instead.
- 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 fire 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: turn on a status light when the dryer starts drawing power
When the dryer power changes to a value above 20 W, turn on a status light so you can see that a cycle is running.
-
Trigger: Power changed
- Target: Dryer power sensor
- Threshold type: Above 20 W
-
Action: Turn on light
- Target: light.utility_room_status
YAML example for a dryer running status light
alias: "Turn on dryer status light when a cycle starts"
triggers:
- trigger: power.changed
target:
entity_id: sensor.dryer_power
options:
threshold:
type: above
value:
number: 20
unit_of_measurement: "W"
actions:
- action: light.turn_on
target:
entity_id: light.utility_room_status
Automation: send a notification when a server rack leaves its normal power range
When the server rack power changes to a value outside 150 W to 350 W, send a notification so you can check whether something unexpected is happening.
-
Trigger: Power changed
- Target: Server rack power sensor
- Threshold type: Outside range (150-350 W)
-
Action: Send a notification message
-
Target: My Device (
notify.my_device)
-
Target: My Device (
YAML example for a server rack power alert
alias: "Alert when server rack power leaves its normal range"
triggers:
- trigger: power.changed
target:
entity_id: sensor.server_rack_power
options:
threshold:
type: outside
value_min:
number: 150
unit_of_measurement: "W"
value_max:
number: 350
unit_of_measurement: "W"
actions:
- action: notify.send_message
target:
entity_id: notify.my_device
data:
message: "Server rack power moved outside its normal range."
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 crossed threshold: Triggers after one or more power values cross a threshold.