Uh oh!
There was an error while loading. Please reload this page.
Improve compatibility between set-functions - #897
Conversation
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (11)
🚧 Files skipped from review as they are similar to previous changes (9)
📝 WalkthroughWalkthroughThe PR aligns schedule-state and DHW method argument ordering across public and legacy APIs, updates schedule OFF/NONE handling and validation, refreshes related tests, updates package metadata, and refreshes manual fixture sensor values. ChangesSchedule and DHW API alignment
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@## main #897 +/- ##
=========================================
Coverage 100.00% 100.00% =========================================
Files 21 21 Lines 3504 3508 +4 =========================================
+ Hits 3504 3508 +4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🧹 Nitpick comments (1)
plugwise/smile.py (1)
349-350: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueAlign parameter defaults with the public API and legacy implementation.
For consistency with the public API in
plugwise/__init__.pyand the legacy implementation inplugwise/legacy/smile.py, consider adding= Noneas the default value for thenameparameter. This ensures the method signatures strictly match across the backend and frontend boundaries.💡 Proposed fix
async def set_schedule_state( - self, loc_id: str, name: str | None, state: str | None = None+ self, loc_id: str, name: str | None = None, state: str | None = None ) -> None:🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@plugwise/smile.py` around lines 349 - 350, Update the affected method signature in the Smile implementation to make the name parameter optional with a None default, matching the public API and legacy Smile implementation while preserving the existing loc_id and state parameters.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@plugwise/smile.py`:
- Around line 349-350: Update the affected method signature in the Smile
implementation to make the name parameter optional with a None default, matching
the public API and legacy Smile implementation while preserving the existing
loc_id and state parameters.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: a09017da-3744-4af6-806c-3cb7b4a22740
📒 Files selected for processing (10)
CHANGELOG.mdfixtures/m_adam_cooling/data.jsonfixtures/m_anna_heatpump_cooling/data.jsonfixtures/m_anna_heatpump_idle/data.jsonplugwise/__init__.pyplugwise/legacy/smile.pyplugwise/smile.pyscripts/manual_fixtures.pytests/test_adam.pytests/test_init.py
70efe8c to
90f169bCompareThere was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tests/test_init.py`:
- Line 747: Update the call to api.set_select in the test helper to pass the
existing state argument along with select_schedule, loc_id, and new_schedule.
Preserve the helper’s on/off transition coverage by ensuring the accepted state
value reaches the API.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: b09c0886-b1b9-48c7-bb9a-44246163a44e
📒 Files selected for processing (11)
CHANGELOG.mdfixtures/m_adam_cooling/data.jsonfixtures/m_anna_heatpump_cooling/data.jsonfixtures/m_anna_heatpump_idle/data.jsonplugwise/__init__.pyplugwise/legacy/smile.pyplugwise/smile.pypyproject.tomlscripts/manual_fixtures.pytests/test_adam.pytests/test_init.py
🚧 Files skipped from review as they are similar to previous changes (8)
- CHANGELOG.md
- tests/test_adam.py
- scripts/manual_fixtures.py
- fixtures/m_adam_cooling/data.json
- plugwise/init.py
- fixtures/m_anna_heatpump_cooling/data.json
- plugwise/smile.py
- plugwise/legacy/smile.py
Uh oh!
There was an error while loading. Please reload this page.
8d33fea to
90f169bCompare90f169b to
205dfd7CompareUh oh!
There was an error while loading. Please reload this page.



Also improve manual fixture creation.
--> Breaking changes:
Summary by CodeRabbit
Summary by CodeRabbit
Enhancements
Bug Fixes
Documentation/Chores