Skip to content

Unit Conversions#11

Merged
eman merged 3 commits intomainfrom
conversions
Oct 13, 2025
Merged

Unit Conversions#11
eman merged 3 commits intomainfrom
conversions

Conversation

@eman
Copy link
Copy Markdown
Owner

@eman eman commented Oct 13, 2025

No description provided.

@eman eman requested a review from Copilot October 13, 2025 20:59
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 implements comprehensive unit conversions for device status fields, standardizing temperature conversions and boolean field handling for Navien water heater devices.

  • Refactors temperature conversion logic to use a dedicated helper function for decicelsius-to-Fahrenheit conversion
  • Corrects boolean field encoding from device (1=OFF, 2=ON instead of simple 0/1)
  • Adds CLI support for viewing raw device status without conversions

Reviewed Changes

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

File Description
src/nwp500/models.py Implements _decicelsius_to_fahrenheit helper function, fixes boolean conversion logic, and reorganizes temperature field conversions
src/nwp500/cli.py Adds --status-raw command line option and validation to prevent concurrent use with --status
docs/DEVICE_STATUS_FIELDS.rst Updates documentation to reflect corrected boolean encoding and standardized temperature conversion formulas

@eman eman merged commit 82f8f57 into main Oct 13, 2025
10 checks passed
@eman eman deleted the conversions branch October 13, 2025 21:03
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.

2 participants