Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: eman/nwp500-python
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: eman/nwp500-python
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: feature/na-value-support
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 5 commits
  • 9 files changed
  • 1 contributor

Commits on Jan 28, 2026

  1. feat: Add N/A value support for unavailable sensors and features

    Support proper N/A display for device features that report 0 to indicate
    'not available' rather than actual zero readings. This addresses confusion
    where missing sensors showed misleading values like 0.0°C/32.0°F instead of N/A.
    
    Three categories of N/A support:
    - Temperature sensors (outside, inlet, recirculation, etc.) - when sensor doesn't exist
    - Optional feature settings (mixing valve, heating element lower) - when feature not present or not applicable to current mode
    - Recirculation pump status - when no pump installed
    
    Key changes:
    - Modified 4 temperature converters to return float | None (return None when value is 0)
    - Created new converters for optional feature values (int_with_zero_as_none, float_with_zero_as_none, etc.)
    - Updated ~25 fields in DeviceStatus model to support optional values
    - CLI now displays 'N/A' instead of misleading zero values
    - Added comprehensive test coverage (6 new tests)
    - Documented all changes in CHANGES.md
    eman committed Jan 28, 2026
    Configuration menu
    Copy the full SHA
    f5ede2e View commit details
    Browse the repository at this point in the history
  2. fix: Address CI lint and type check failures

    - Use ternary operator for N/A value formatting (SIM108)
    - Shorten test docstrings to meet line length limit (E501)
    - Add None check for recirc_operation_mode before accessing attributes
      to fix type errors in handlers.py (reportOptionalMemberAccess)
    eman committed Jan 28, 2026
    Configuration menu
    Copy the full SHA
    79bd514 View commit details
    Browse the repository at this point in the history
  3. fix: Clarify misleading comment in recirculation test

    Changed '# Should be None' to '# 0 will become None' to accurately
    describe that the input value of 0 will be converted to None during
    validation, addressing review feedback from Copilot.
    eman committed Jan 28, 2026
    Configuration menu
    Copy the full SHA
    8fc4b73 View commit details
    Browse the repository at this point in the history

Commits on Feb 13, 2026

  1. Configuration menu
    Copy the full SHA
    7f2c361 View commit details
    Browse the repository at this point in the history
  2. Fix zero-as-none bug for heat pump temperature sensors

    BREAKING CHANGE: Heat pump sensors now correctly report 0°C/32°F instead
    of None for freezing temperatures.
    
    Problem:
    The previous implementation treated 0 as a universal sentinel for "N/A",
    causing heat pump compressor/refrigerant sensors to incorrectly report
    "unavailable" when measuring 0°C during normal operation.
    
    Solution:
    - Removed zero-as-none from deci_celsius_to_preferred() converter
      (used for heat pump sensors with 0.1°C precision)
    - Kept zero-as-none for half_celsius_to_preferred() converter
      (used for optional sensors and mode-dependent settings)
    - Kept zero-as-none for raw_celsius_to_preferred() converter
      (used for optional outside sensor)
    
    Protocol Analysis:
    The device protocol uses different temperature precision for different
    sensor types with different semantics:
    - DeciCelsius (0.1°C): Heat pump sensors - 0 = valid 0°C reading
    - HalfCelsius (0.5°C): Optional/mode-dependent - 0 = N/A
    - RawCelsius: Optional external sensor - 0 = not installed
    
    Type Safety:
    - Added None-handling to _format_number() in CLI formatters
    - Updated example code to safely format optional temperatures
    - All tests passing (410 passed, 3 skipped)
    
    Fixes issue identified in reference/na_evaluation.txt
    eman committed Feb 13, 2026
    Configuration menu
    Copy the full SHA
    d616613 View commit details
    Browse the repository at this point in the history
Loading