Skip to content

power on / off feature in cli#8

Merged
eman merged 3 commits intomainfrom
device_status
Oct 12, 2025
Merged

power on / off feature in cli#8
eman merged 3 commits intomainfrom
device_status

Conversation

@eman
Copy link
Copy Markdown
Owner

@eman eman commented Oct 12, 2025

No description provided.

@eman eman assigned Copilot and unassigned Copilot Oct 12, 2025
@eman eman requested a review from Copilot October 12, 2025 03:25
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 adds power on/off functionality to the CLI and library, enabling users to control device power state via command line and programmatically. The key enhancement is adding the POWER_OFF mode (value 6) to distinguish between powered-off devices and devices that are simply idle.

  • Added --power-on and --power-off CLI arguments for device power control
  • Enhanced OperationMode enum with POWER_OFF (6) state that appears in dhwOperationSetting
  • Improved documentation to clarify distinction between operationMode (current state) and dhwOperationSetting (configured preference)

Reviewed Changes

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

Show a summary per file
File Description
src/nwp500/models.py Added POWER_OFF enum value and conversion logic for dhwOperationSetting field
src/nwp500/cli.py Added power control CLI arguments and handler function
examples/power_control_example.py New example demonstrating programmatic power control
docs/MQTT_MESSAGES.rst Updated documentation to clarify operationMode vs dhwOperationSetting
docs/MQTT_CLIENT.rst Enhanced mode documentation with clearer field relationships
docs/DEVICE_STATUS_FIELDS.rst Comprehensive documentation on operation mode field distinctions
README.rst Added CLI power control examples and corrected mode ID mappings

eman and others added 2 commits October 11, 2025 20:29
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@eman eman merged commit c288af2 into main Oct 12, 2025
10 checks passed
@eman eman deleted the device_status branch October 12, 2025 03:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants