-
Notifications
You must be signed in to change notification settings - Fork 8
Improve userdata for added Emma #798
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
WalkthroughRefreshes the Adam/Anna test fixtures and userdata: numerous sensor values, states, MAC addresses, timestamps, and thermostat configurations updated; adds a binary_sensors section for Emma; adjusts OpenTherm readings; and updates one test expectation (entity_items 195 → 197). No schema or code logic changes. Changes
Sequence Diagram(s)Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 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 (4)
🔇 Additional comments (10)
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 #798 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 21 21
Lines 3400 3400
=========================================
Hits 3400 3400 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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 (4)
fixtures/adam_anna_new_2/data.json
(18 hunks)tests/data/adam/adam_anna_new_2.json
(18 hunks)tests/test_adam.py
(1 hunks)userdata/adam_anna_new_2/core.domain_objects.xml
(54 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Process test coverage
🔇 Additional comments (9)
tests/test_adam.py (1)
201-201
: LGTM! Entity count increase aligns with Emma enhancements.The entity count increase from 195 to 197 correctly reflects the addition of two new entities for the Emma device: the
low_battery
binary sensor and thebattery
sensor, as evidenced in the corresponding fixture updates.fixtures/adam_anna_new_2/data.json (3)
29-31
: Binary sensor addition for Emma is correctly structured.The addition of the
binary_sensors
block withlow_battery: false
for the Emma device properly extends the device's capabilities and aligns with the test expectation increase.
6-7
: OpenTherm state changes reflect active heating.The transition of
flame_state
andheating_state
totrue
, along with the increase inintended_boiler_temperature
from 0.0 to 22.5, correctly simulates an active heating scenario, which is consistent with the Living room zone's state change toheating
.Also applies to: 20-21
239-240
: Living room state transitions are logically consistent.The coordinated changes in the Living room zone—
active_preset
fromvacation
tohome
,control_state
fromidle
toheating
, and the increase inelectricity_consumed
from 15.6 to 64.8—form a coherent state reflecting active heating demand.Also applies to: 248-249, 255-263
tests/data/adam/adam_anna_new_2.json (1)
1-310
: Test data aligns with fixture updates.The changes in this test data file correctly mirror the updates made to
fixtures/adam_anna_new_2/data.json
, maintaining consistency between the fixture and test expectations. The device states, sensor values, and MAC addresses are properly synchronized.userdata/adam_anna_new_2/core.domain_objects.xml (4)
243-245
: Battery meter service correctly added for Emma.The addition of the
battery_meter
service (id='17570d84b8f14d98bc732be2d6be98aa') to Emma's module properly extends the device's monitoring capabilities and aligns with the corresponding point_log addition in the appliance section.
1815-1824
: Battery point_log correctly integrated into Emma appliance.The battery point_log has been properly added to the Emma appliance with appropriate metadata (type, unit, timestamps) and a measurement value of 1.00 (representing 100% battery), which is consistent with the JSON fixture value of 100.
52-52
: MAC address updates are systematic and consistent.The MAC addresses have been updated to the CBA0 pattern throughout the XML file, matching the changes in the JSON fixtures. The updates appear in:
- ZigBee node definitions
- Gateway configurations
- Device module protocols
This systematic update maintains consistency across all fixture files.
Also applies to: 261-261, 430-430, 872-873, 1124-1124, 1316-1316, 1665-1665, 1978-1978, 2372-2372
734-734
: Living room state transitions correctly reflected in XML.The Living room location's preset changed to
home
and the thermostat_functionality'scontrol_state
changed toheating
with setpoint updated to 21, which properly mirrors the JSON fixture changes and represents an active heating scenario.Also applies to: 814-818
Replaced by #799 |
Summary by CodeRabbit