Skip to content

Fix multi circuits#1416

Merged
liudger merged 10 commits intomainfrom
fix-multi-circuits
Mar 25, 2026
Merged

Fix multi circuits#1416
liudger merged 10 commits intomainfrom
fix-multi-circuits

Conversation

@liudger
Copy link
Copy Markdown
Owner

@liudger liudger commented Mar 25, 2026

This pull request removes all support for a third heating circuit (HC3) from the codebase, limiting multi-circuit handling to only two heating circuits (HC1 and HC2). It updates constants, API configuration, parameter mappings, tests, and example scripts accordingly. Additionally, it corrects parameter IDs for HC2 to match the actual device specification.

Key changes:

Removal of HC3 (Third Heating Circuit) Support

  • All code, configuration, and tests referencing HC3 (third heating circuit) have been removed, including parameter lists, API sections, and test cases. This affects files such as src/bsblan/constants.py, src/bsblan/bsblan.py, examples/speed_test.py, and tests/test_circuit.py. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17]

Update of HC2 Parameter IDs

  • The parameter IDs for HC2 have been updated to reflect the correct values as per the device specification (e.g., "8741""8770", "8750""8779" in both code and test fixtures). [1] [2] [3] [4]

Constants and API Configuration Adjustments

  • The maximum supported circuit is now 2, and all related constants, mappings, and API configuration structures have been updated to reflect this. [1] [2] [3] [4]

Test Suite Cleanup

  • Tests for HC3 have been removed, and all test logic now only considers HC1 and HC2. This includes parameter validation, circuit detection, and thermostat operations. [1] [2] [3] [4] [5] [6] [7] [8] [9]

Documentation and Example Updates

  • Example scripts and docstrings have been updated to match the new two-circuit limitation, removing all references to triple-circuit scenarios. [1] [2] [3]

This change simplifies the codebase and ensures alignment with actual device capabilities, reducing maintenance overhead and potential confusion regarding unsupported third-circuit features.

Copilot AI review requested due to automatic review settings March 25, 2026 10:29
@liudger liudger added the bugfix Inconsistencies or issues which will cause a problem for users or implementers. label Mar 25, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.89%. Comparing base (2837544) to head (bba8632).
⚠️ Report is 14 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1416      +/-   ##
==========================================
- Coverage   99.89%   99.89%   -0.01%     
==========================================
  Files           6        6              
  Lines         997      986      -11     
  Branches      139      139              
==========================================
- Hits          996      985      -11     
  Partials        1        1              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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

Removes third heating circuit (HC3) support from the python-bsblan async client to align multi-circuit handling with devices that only expose HC1/HC2, and updates HC2 parameter IDs to match the real device spec.

Changes:

  • Drop HC3 sections/parameter mappings and limit circuit validation/discovery to HC1–HC2.
  • Correct HC2 parameter IDs (notably current_temperature and room1_thermostat_mode) across constants, fixtures, and examples.
  • Update tests to reflect the two-circuit model and remove HC3-specific scenarios.

Reviewed changes

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

Show a summary per file
File Description
src/bsblan/constants.py Reduces supported circuits to 2, removes HC3 mappings/sections, updates HC2 parameter IDs.
src/bsblan/bsblan.py Removes HC3 from required sections and updates multi-circuit logic/comments to be HC2-only.
tests/test_initialization.py Updates initialization expectations to exclude HC3 sections.
tests/test_hotwater_state.py Adjusts test API config to exclude HC3 sections.
tests/test_constants.py Updates required API config sections to match two-circuit support.
tests/test_circuit.py Removes HC3 tests and tightens invalid-circuit assertions to reject circuit 3.
tests/test_api_validation.py Removes HC3 sections from validation cache tests.
tests/fixtures/state_circuit2.json Updates fixture keys to corrected HC2 parameter IDs.
examples/speed_test.py Removes triple-circuit benchmark suite and updates HC2 param list/IDs.

@sonarqubecloud
Copy link
Copy Markdown

@liudger liudger merged commit dcc3e13 into main Mar 25, 2026
14 checks passed
@liudger liudger deleted the fix-multi-circuits branch March 25, 2026 11:33
@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bugfix Inconsistencies or issues which will cause a problem for users or implementers.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants