-
-
Notifications
You must be signed in to change notification settings - Fork 79
Update climate entity container types in api.proto #1405
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
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1405 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 22 22
Lines 3310 3310
=========================================
Hits 3310 3310 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
CodSpeed Performance ReportMerging #1405 will not alter performanceComparing Summary
Footnotes |
WalkthroughThe Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes The changes follow a consistent, homogeneous pattern across six fields within a single message definition. All modifications are annotation-level updates with no complex logic or branching, making them straightforward to verify for correctness and consistency. Possibly related PRs
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 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 |
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: 0
🧹 Nitpick comments (1)
aioesphomeapi/api.proto (1)
992-1005: Add tests for container type changes.The PR checklist indicates testing is unchecked. Container type changes affect serialization, deserialization, and memory layout. Add unit or integration tests that verify:
- Messages with the new mask types and vector containers serialize/deserialize correctly.
- Round-trip serialization preserves data (e.g., all supported modes round-trip faithfully).
- Interoperability with esphome's implementation (if applicable).
- No performance regressions from the container type changes.
Do you want guidance on what test coverage should look like for protobuf message container changes, or would you prefer to defer this to the esphome PR review?
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
aioesphomeapi/api.proto(2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**
⚙️ CodeRabbit configuration file
- Do not generate or add any sequence diagrams
Files:
aioesphomeapi/api.proto
⏰ 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: py 3.11 on ubuntu-latest (use_cython)
🔇 Additional comments (2)
aioesphomeapi/api.proto (2)
992-1005: Verify esphome PR coordination and mask type definitions.This PR introduces container type changes that depend on corresponding C++ codegen and mask type definitions in the esphome repository. The PR objectives note that linking the esphome PR is an unchecked checklist item.
- Confirm the esphome PR exists and has been merged or is in review.
- Verify that mask type definitions (
climate::ClimateModeMask,climate::ClimateFanModeMask,climate::ClimateSwingModeMask,climate::ClimatePresetMask) are properly defined and handled in esphome's C++ code.- Ensure esphome's protobuf code generator correctly handles the
container_pointer_no_templateannotation for these mask types.Without these coordinated changes, the generated C++ code may fail to compile or serialize/deserialize messages incorrectly.
1003-1003: Clarify data structure contract change for custom modes and presets.Lines 1003 and 1005 transition
supported_custom_fan_modesandsupported_custom_presetsfromstd::set(unordered, unique elements) tostd::vector(ordered, allows duplicates). This semantic change affects:
- Uniqueness: Sets guarantee no duplicates; vectors do not.
- Order: Vectors preserve insertion order; sets do not.
- API contracts: Callers expecting a set of unique values may encounter duplicates.
Confirm this change is intentional. If the goal is to preserve order and allow duplicates, document this in the message comment. If this is unintended, revert to
std::setfor these fields.Also applies to: 1005-1005
What does this implement/fix?
Update climate entity container types in api.proto
for esphome/esphome#11466
Types of changes
Related issue or feature (if applicable):
Pull request in esphome (if applicable):
Checklist:
tests/folder).