-
Notifications
You must be signed in to change notification settings - Fork 8
Improve detection of orphaned/removed devices #802
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughAdded early-return guards when module data contents are empty to signal device removal; adjusted heater_central lookup fallback and thermostat handling. Added fixtures, test data, a test for a gateway with no modules, bumped version to 1.8.1, and added a comprehensive domain_objects XML. Changes
Sequence Diagram(s)mermaid
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
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 |
78b6f14
to
811d58b
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #802 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 21 21
Lines 3400 3414 +14
=========================================
+ Hits 3400 3414 +14 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
811d58b
to
78132d8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
plugwise/common.py
(2 hunks)plugwise/helper.py
(1 hunks)plugwise/legacy/helper.py
(1 hunks)pyproject.toml
(1 hunks)userdata/adam_anna_new_2/core.domain_objects.xml
(0 hunks)
💤 Files with no reviewable changes (1)
- userdata/adam_anna_new_2/core.domain_objects.xml
🚧 Files skipped from review as they are similar to previous changes (3)
- plugwise/legacy/helper.py
- pyproject.toml
- plugwise/helper.py
🔇 Additional comments (1)
plugwise/common.py (1)
122-124
: Verification confirmed: callers properly handle emptyMunch()
return.Both call sites evaluate the
_appliance_info_finder
result using a falsy check with the walrus operator:
helper.py:153
:if not (appl := self._appliance_info_finder(appl, appliance)): continue
legacy/helper.py:130
:if not (appl := self._appliance_info_finder(appliance, appl)): continue
When
_appl_thermostat_info
returns an emptyMunch()
(signaling device removal), the empty object evaluates as falsy, triggeringcontinue
and skipping appliance processing. The defensive guard is safe and correctly implemented.
78132d8
to
811d58b
Compare
811d58b
to
a3f4e32
Compare
|
Summary by CodeRabbit
Bug Fixes
New Features
Tests
Chores