Skip to content

feat(capabilities): Add target power capabilities#627

Merged
RobinBol merged 17 commits intodevelopfrom
feature/target-power
Feb 19, 2026
Merged

feat(capabilities): Add target power capabilities#627
RobinBol merged 17 commits intodevelopfrom
feature/target-power

Conversation

@RobinBol
Copy link
Copy Markdown
Contributor

@RobinBol RobinBol commented Jan 21, 2026

This pull request introduces new capabilities for target power control and enforces stricter validation rules for drivers that use these capabilities, especially for home battery devices. It also adds comprehensive tests to ensure these validations work as intended.

New capabilities for target power control:

  • Added target_power and target_power_mode to the list of available capabilities in capabilities.json.
  • Introduced the target_power capability definition, supporting numeric values (in watts), UI configuration, flow triggers/actions, and localization.
  • Introduced the target_power_mode capability definition, supporting an enum for control mode (device or Homey), UI configuration, flow triggers/conditions/actions, and localization.

Validation improvements for driver manifests:

  • Updated lib/App/index.js to validate that:
    • target_power_mode values include both 'device' and 'homey'.
    • If capabilitiesOptions.exclude is set for target_power, its range must include 0.
    • For home battery drivers, target_power min/max must include 0 to allow idle state.

Test coverage enhancements:

  • Added tests in test/validate-driver-manifest.js to ensure home battery drivers with target_power capability require min/max ranges including 0, and that non-home-battery drivers are not subject to this rule.

TODO:

  • Update Homey version number in minCompatibility.

…ilities

Added new capabilities for target power, target charging power, and target discharging power to enhance energy management features.
@RobinBol RobinBol requested a review from Copilot January 21, 2026 15:46
@RobinBol RobinBol self-assigned this Jan 21, 2026
Copy link
Copy Markdown

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 adds three new capability definitions for energy management: target power, target charging power, and target discharging power. Each capability provides setable/getable power values in watts with slider UI controls and flow automation support.

Changes:

  • Added three new JSON capability definitions with multilingual support (16 languages)
  • Integrated trigger and action flow configurations for each capability
  • Updated the main capabilities registry to include the new power-related capabilities

Reviewed changes

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

File Description
target_power.json Defines general target power capability with flow triggers/actions
target_power_charge.json Defines target charging power capability with flow triggers/actions
target_power_discharge.json Defines target discharging power capability with flow triggers/actions
capabilities.json Registers the three new capabilities in alphabetical order

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread assets/capability/capabilities/target_power.json Outdated
Comment thread assets/capability/capabilities/target_power_charge.json Outdated
…tions

Ensure that the capability options for target_power_mode include both 'automatic' and 'override' values to prevent invalid configurations.
Ensure that the exclude range for target_power capability options includes 0, throwing an error if it does not.
…eries

Ensure that the target_power min/max range for home batteries includes 0 to allow for idle state. This validation prevents incorrect configurations that could lead to operational issues.
@RobinBol RobinBol force-pushed the feature/target-power branch from 45d0d1f to b3b0e13 Compare January 28, 2026 10:42
Changed the options for the 'target_power_mode' capability from 'automatic' and 'override' to 'device' and 'homey' to better reflect the available modes.
@RobinBol RobinBol requested a review from Copilot January 29, 2026 14:31
Copy link
Copy Markdown

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

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


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lib/App/index.js Outdated
Comment thread test/validate-driver-manifest.js Outdated
Comment thread test/validate-driver-manifest.js Outdated
Comment thread test/validate-driver-manifest.js Outdated
Comment thread test/validate-driver-manifest.js Outdated
…eMax capability options

Replace nested `exclude: { min, max }` with top-level `excludeMin`/`excludeMax`
properties across all repos.
@RobinBol RobinBol marked this pull request as ready for review January 30, 2026 13:39
Added hints to the target power and target power mode capabilities to clarify the functionality of "Homey" and "Device" control options for users. This enhances user understanding of how to manage target power settings effectively.
@RobinBol RobinBol changed the title feat(capabilities): Add target power, charging, and discharging capabilities feat(capabilities): Add target power capabilities Feb 17, 2026
@RobinBol
Copy link
Copy Markdown
Contributor Author

@copilot update Homey version number in minCompatibility to 12.13.0

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 19, 2026

@RobinBol I've opened a new pull request, #643, to work on those changes. Once the pull request is ready, I'll request review from you.

…er capabilities

Co-authored-by: RobinBol <5762579+RobinBol@users.noreply.github.com>
@RobinBol RobinBol merged commit 139e5e0 into develop Feb 19, 2026
2 checks passed
@RobinBol RobinBol deleted the feature/target-power branch February 19, 2026 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

5 participants