Skip to content

Add cooling support#1549

Open
liudger wants to merge 7 commits into
mainfrom
cooling-support
Open

Add cooling support#1549
liudger wants to merge 7 commits into
mainfrom
cooling-support

Conversation

@liudger

@liudger liudger commented Jul 3, 2026

Copy link
Copy Markdown
Owner

Add support to set cooling mode on circuit 1 and 2. (901 and ...)

Also this pull request introduces three new prompt files for OpenSpec experimental workflows and refines the validation logic in the .github/hooks/run_validation_after_edits.sh script. The main improvements include more robust and targeted validation after file edits, as well as comprehensive, well-documented prompt guides for applying, archiving, and exploring OpenSpec changes.

Validation logic improvements:

  • Targeted validation trigger: The validation script now only triggers the Python validation suite if an edit tool is used and code/config files are actually modified, rather than running for any edit action. This reduces unnecessary validation runs and improves performance. [1] [2]
  • Environment variable for prek: The script now sets SKIP=no-commit-to-branch when running prek to ensure proper pre-commit hook behavior.

New OpenSpec workflow prompts:

  • Apply prompt: Adds .github/prompts/opsx-apply.prompt.md, a detailed step-by-step guide for implementing tasks from an OpenSpec change, including change selection, status checking, task implementation, and guardrails for safe, minimal, and clear task completion.
  • Archive prompt: Adds .github/prompts/opsx-archive.prompt.md, which provides a robust workflow for archiving completed changes, including checks for incomplete artifacts or tasks, delta spec sync, and clear user prompts and summaries.
  • Explore prompt: Adds .github/prompts/opsx-explore.prompt.md, defining an "explore mode" for open-ended investigation, brainstorming, and requirements clarification, with strong guardrails to prevent accidental implementation and encourage visual thinking.

liudger added 7 commits July 2, 2026 13:29
- Introduced `openspec-propose` skill to facilitate proposing changes with all artifacts generated in one step.
- Added `openspec-sync-specs` skill for syncing delta specs from a change to main specs, allowing intelligent merging.
- Created `openspec-apply-change` skill to implement tasks from an OpenSpec change, supporting ongoing implementation.
- Implemented `openspec-archive-change` skill for archiving completed changes in the experimental workflow.
- Added `openspec-explore` skill to enable exploration of ideas and requirements without implementing features.
- Developed `openspec-apply-change` and `openspec-archive-change` skills to manage change implementation and archiving processes.
- Created prompts for `opsx:propose` and `opsx:sync` to guide users through proposing changes and syncing specs.
Copilot AI review requested due to automatic review settings July 3, 2026 06:37
@liudger liudger added the enhancement Enhancement of the code, not introducing new features. label Jul 3, 2026
@codecov

codecov Bot commented Jul 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (e9a289f) to head (089a686).

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #1549   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           10        10           
  Lines         1235      1247   +12     
  Branches       142       145    +3     
=========================================
+ Hits          1235      1247   +12     

☔ View full report in Codecov by Harness.
📢 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.

@sonarqubecloud

sonarqubecloud Bot commented Jul 3, 2026

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for reading/writing the cooling circuit operating mode (BSB-LAN params 901 / 1201) in the core client (State + thermostat()), with corresponding validation constants, fixtures, tests, and docs. The PR also introduces an experimental OpenSpec workflow prompt/skill set and refines the post-edit validation hook to more selectively run Python validation.

Changes:

  • Add cooling_operating_mode to API parameter mappings and the State model (full-config, circuit-aware).
  • Extend BSBLAN.thermostat() to set cooling operating mode with client-side value validation and PPS rejection.
  • Update tests/fixtures/docs/examples plus add OpenSpec workflow prompts/skills and improve the validation-after-edits hook logic.

Reviewed changes

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

Show a summary per file
File Description
tests/test_thermostat.py Adds thermostat setter + validation tests for cooling_operating_mode.
tests/test_state.py Asserts cooling_operating_mode in state and validates stripping when unsupported.
tests/test_pps.py Ensures PPS devices reject cooling_operating_mode writes.
tests/test_constants.py Updates expectations for full/basic API config around param 901.
tests/test_circuit.py Adds circuit 2 coverage for reading/setting cooling_operating_mode (1201).
tests/fixtures/state.json Adds fixture data for param 901.
tests/fixtures/state_circuit2.json Adds fixture data for param 1201.
src/bsblan/models.py Adds `State.cooling_operating_mode: EntityInfo[int]
src/bsblan/constants.py Maps 901/1201 and adds Validation.COOLING_OPERATING_MODES.
src/bsblan/bsblan.py Extends thermostat() + payload prep + validation method for cooling operating mode.
README.md Updates feature list to include cooling operating mode.
openspec/specs/cooling-operating-mode/spec.md Adds main OpenSpec capability spec for cooling operating mode.
openspec/config.yaml Adds OpenSpec repo configuration scaffold.
openspec/changes/archive/2026-07-03-add-cooling-operating-mode/tasks.md Archives implementation task checklist for the change.
openspec/changes/archive/2026-07-03-add-cooling-operating-mode/specs/cooling-operating-mode/spec.md Archives delta spec content for the change.
openspec/changes/archive/2026-07-03-add-cooling-operating-mode/proposal.md Archives proposal artifact for the change.
openspec/changes/archive/2026-07-03-add-cooling-operating-mode/design.md Archives design artifact for the change.
openspec/changes/archive/2026-07-03-add-cooling-operating-mode/.openspec.yaml Archives OpenSpec change metadata.
examples/control.py Prints cooling_operating_mode in the example state output.
docs/index.md Updates docs feature list for cooling operating mode.
docs/getting-started.md Documents reading/setting cooling_operating_mode.
.github/skills/openspec-sync-specs/SKILL.md Adds an OpenSpec “sync specs” skill definition.
.github/skills/openspec-propose/SKILL.md Adds an OpenSpec “propose change” skill definition.
.github/skills/openspec-explore/SKILL.md Adds an OpenSpec “explore mode” skill definition.
.github/skills/openspec-archive-change/SKILL.md Adds an OpenSpec “archive change” skill definition.
.github/skills/openspec-apply-change/SKILL.md Adds an OpenSpec “apply/implement change” skill definition.
.github/prompts/opsx-sync.prompt.md Adds OpenSpec sync prompt content.
.github/prompts/opsx-propose.prompt.md Adds OpenSpec propose prompt content.
.github/prompts/opsx-explore.prompt.md Adds OpenSpec explore prompt content.
.github/prompts/opsx-archive.prompt.md Adds OpenSpec archive prompt content.
.github/prompts/opsx-apply.prompt.md Adds OpenSpec apply prompt content.
.github/hooks/run_validation_after_edits.sh Refines when to run validation and updates prek invocation.

Comment thread docs/getting-started.md

```python
async with BSBLAN(config) as client:
state = await client.state(include=["cooling_operating_mode"])
Comment thread src/bsblan/bsblan.py
logger.debug("Response for setting time: %s", response)

async def thermostat(
async def thermostat( # pylint: disable=too-many-arguments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Enhancement of the code, not introducing new features.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants