Skip to content

Avoid status probes during circuit discovery#1472

Merged
liudger merged 1 commit intomainfrom
no-operation-mode-circuit-discovery
May 8, 2026
Merged

Avoid status probes during circuit discovery#1472
liudger merged 1 commit intomainfrom
no-operation-mode-circuit-discovery

Conversation

@liudger
Copy link
Copy Markdown
Owner

@liudger liudger commented May 8, 2026

This pull request simplifies and streamlines the detection logic for available heating circuits in the BSBLAN integration. The main change is that circuit discovery now relies solely on the configured probe parameters (operating mode), no longer querying or interpreting status parameters. The test suite is updated to reflect this logic, removing tests and code related to status parameter checks and ensuring that only the correct probe parameters are used.

Circuit discovery logic simplification:

  • src/bsblan/bsblan.py: The get_available_circuits method now only uses the operating mode probe parameters (700 for circuit 1, 1000 for circuit 2) to detect available circuits, eliminating the previous two-step check involving status parameters. This makes setup lighter and avoids false negatives when status data is unavailable. [1] [2]

Test suite updates:

  • tests/test_circuit.py: All tests are updated to remove status parameter probes and checks. Tests now assert that only the operating mode parameters are queried, and that circuits are detected solely based on these probes. [1] [2] [3] [4] [5] [6]
  • tests/test_circuit.py: Tests previously covering scenarios where status parameters returned inactive or empty results are removed or refactored, as these cases are no longer relevant to circuit detection. [1] [2]

These changes improve reliability and maintainability by making circuit detection logic more predictable and easier to test.

Copilot AI review requested due to automatic review settings May 8, 2026 09:50
@liudger liudger added the bugfix Inconsistencies or issues which will cause a problem for users or implementers. label May 8, 2026
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 simplifies heating circuit discovery in python-bsblan by determining available circuits solely via the operating mode probe parameters, removing the previous status-parameter-based validation step to reduce setup overhead and avoid false negatives.

Changes:

  • Updated BSBLAN.get_available_circuits() to probe only operating mode parameters (no status probes).
  • Removed status-probe scenarios from the circuit discovery tests and added assertions that only probe parameters are queried.

Reviewed changes

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

File Description
src/bsblan/bsblan.py Simplifies circuit discovery to rely only on operating-mode probe params and updates logging/docstring accordingly.
tests/test_circuit.py Updates and tightens tests to reflect probe-only discovery, removing status-parameter expectations.

Comment thread src/bsblan/bsblan.py Outdated
Comment thread tests/test_circuit.py Outdated
@codecov
Copy link
Copy Markdown

codecov Bot commented May 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.89%. Comparing base (1191711) to head (c5eb013).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1472      +/-   ##
==========================================
- Coverage   99.89%   99.89%   -0.01%     
==========================================
  Files           6        6              
  Lines         997      990       -7     
  Branches      135      133       -2     
==========================================
- Hits          996      989       -7     
  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.

@liudger liudger force-pushed the no-operation-mode-circuit-discovery branch from 750c935 to a95996c Compare May 8, 2026 09:57
@liudger liudger force-pushed the no-operation-mode-circuit-discovery branch from a95996c to c5eb013 Compare May 8, 2026 10:03
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 8, 2026

@liudger liudger merged commit ff42ff0 into main May 8, 2026
16 checks passed
@liudger liudger deleted the no-operation-mode-circuit-discovery branch May 8, 2026 11:12
@github-actions github-actions Bot locked and limited conversation to collaborators May 10, 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