Skip to content

power: document triggers & conditions (Labs feature)#45730

Open
fdmarcin wants to merge 2 commits into
currentfrom
msj-power-labs-triggers-conditions
Open

power: document triggers & conditions (Labs feature)#45730
fdmarcin wants to merge 2 commits into
currentfrom
msj-power-labs-triggers-conditions

Conversation

@fdmarcin
Copy link
Copy Markdown
Contributor

@fdmarcin fdmarcin commented Jun 3, 2026

Proposed change

Document the Power integration Labs triggers and condition using the current split-page format. This updates the integration page, adds trigger pages for power.changed and power.crossed_threshold, and adds a condition page for power.is_value.

Type of change

  • Spelling, grammar or other readability improvements (current branch).
  • Adjusted missing or incorrect information in the current documentation (current branch).
  • Added documentation for a new integration I am adding to Home Assistant (next branch).
  • Added documentation for a new feature I am adding to Home Assistant (next branch).
  • Removed stale or deprecated documentation.

Additional information

Checklist

  • This PR uses the correct branch, based on one of the following:
    • I made a change to the existing documentation and used the current branch.
    • I made a change that is related to an upcoming version of Home Assistant and used the next branch.
  • The documentation follows the Home Assistant documentation standards.

@home-assistant home-assistant Bot added the current This PR goes into the current branch label Jun 3, 2026
@netlify
Copy link
Copy Markdown

netlify Bot commented Jun 3, 2026

Deploy Preview for home-assistant-docs ready!

Name Link
🔨 Latest commit 69c22ce
🔍 Latest deploy log https://app.netlify.com/projects/home-assistant-docs/deploys/6a23030358614c000843ebc7
😎 Deploy Preview https://deploy-preview-45730--home-assistant-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@fdmarcin fdmarcin force-pushed the msj-power-labs-triggers-conditions branch from bf2ca91 to d769bd3 Compare June 3, 2026 14:57
@silamon
Copy link
Copy Markdown
Contributor

silamon commented Jun 3, 2026

I'm still seeing a combination of behavior options.

Here's what we're changing:

  • any becomes each
  • first stays
  • last becomes all

We should be using each over any in the documentation.

@fdmarcin
Copy link
Copy Markdown
Contributor Author

fdmarcin commented Jun 5, 2026

@silamon Thanks! You're right, I missed a couple. To clarify, this only changed for triggers, right?

Edit: the two remaining occurrences of type: any should stay because they don't refer to behavior, but threshold.

Comment thread source/_triggers/power.changed.markdown
Comment thread source/_triggers/power.changed.markdown
@fdmarcin fdmarcin force-pushed the msj-power-labs-triggers-conditions branch from d769bd3 to 69c22ce Compare June 5, 2026 17:10
@fdmarcin fdmarcin marked this pull request as ready for review June 5, 2026 17:39
@fdmarcin fdmarcin requested a review from a team as a code owner June 5, 2026 17:39
Copilot AI review requested due to automatic review settings June 5, 2026 17:39
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR documents the Power integration’s Labs triggers and condition using the split-page documentation format, expanding the Power integration docs to include dedicated pages for the new trigger/condition types and adding example automations.

Changes:

  • Added new trigger docs for power.changed and power.crossed_threshold.
  • Added a new condition doc for power.is_value.
  • Updated the Power integration page to include triggers/conditions sections and practical automation examples.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
source/_integrations/power.markdown Expands the integration page with contextual guidance (power vs. energy), and adds example automations.
source/_triggers/power.changed.markdown New split-page trigger documentation for reacting to matching power value changes.
source/_triggers/power.crossed_threshold.markdown New split-page trigger documentation for reacting to power threshold crossings (enter/leave zones).
source/_conditions/power.is_value.markdown New split-page condition documentation for testing current power values against a threshold.

Comment on lines +71 to +76
options:
threshold:
type: below
value:
number: 3
unit_of_measurement: "W"
Comment on lines +57 to +62
options:
threshold:
type: above
value:
number: 10
unit_of_measurement: "W"
Comment on lines +63 to +68
options:
threshold:
type: below
value:
number: 2500
unit_of_measurement: "W"
---

This {% term integration %} provides automation triggers and conditions for sensors and number entities with device class power. There are no configuration options for this integration.
This {% term integration %} provides automation triggers and conditions for sensors with the power device class. Use it when you want to react to how much power a device or circuit is using right now. There are no configuration options for this integration.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

current This PR goes into the current branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

power triggers & conditions

3 participants