Merged
Conversation
Contributor
There was a problem hiding this comment.
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.