Skip to content

Conversation

@bouwew
Copy link
Contributor

@bouwew bouwew commented Nov 10, 2025

Summary by CodeRabbit

  • Tests
    • Updated entity categorization metadata in test snapshots for binary sensors, select entities, and sensors.
    • Adjusted entity category assignments to reflect configuration and diagnostic classifications.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 10, 2025

Walkthrough

This PR updates Plugwise integration test snapshots, removing DIAGNOSTIC entity categorization from binary sensors and sensors while updating select entities with CONFIG categorization and prefixed translation keys.

Changes

Cohort / File(s) Summary
Binary Sensor Snapshots
tests/components/plugwise/snapshots/test_binary_sensor.ambr
Removed EntityCategory.DIAGNOSTIC designation from numerous binary sensor entries, setting entity_category to None
Select Snapshots
tests/components/plugwise/snapshots/test_select.ambr
Updated translation keys with select_ prefix (e.g., select_gateway_mode, select_regulation_mode) and changed entity_category from None to EntityCategory.CONFIG for multiple select entities
Sensor Snapshots
tests/components/plugwise/snapshots/test_sensor.ambr
Removed EntityCategory.DIAGNOSTIC designation from numerous sensor entries, setting entity_category to None

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Snapshot updates are straightforward and follow consistent patterns across files
  • Changes involve standardized transformations (entity category removal/assignment, translation key prefixing)
  • No behavioral logic modifications; verification focuses on snapshot accuracy and consistency

Possibly related PRs

Suggested reviewers

  • CoMPaTech

Poem

🐰 Snapshots sorted, categories aligned,
Diagnostic dust left far behind,
Select with CONFIG, prefixes in place,
Clean registry at a rabbit's pace!

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly references the related issue (#952) and clearly indicates the PR purpose is to fix missed snapshot updates from that issue.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch test-diag

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 53b8914 and 0b8dc4a.

📒 Files selected for processing (3)
  • tests/components/plugwise/snapshots/test_binary_sensor.ambr (7 hunks)
  • tests/components/plugwise/snapshots/test_select.ambr (8 hunks)
  • tests/components/plugwise/snapshots/test_sensor.ambr (50 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: CoMPaTech
Repo: plugwise/plugwise-beta PR: 0
File: :0-0
Timestamp: 2025-01-25T20:42:24.862Z
Learning: The linting rules in plugwise-beta have been updated to use TC001/TC002/TC003 instead of TCH001/TCH002/TCH003 for type-checking related rules.
Learnt from: bouwew
Repo: plugwise/plugwise-beta PR: 793
File: custom_components/plugwise/manifest.json:10-11
Timestamp: 2024-12-12T19:48:34.652Z
Learning: In the Plugwise integration, temporary use of alpha versions from test repositories is acceptable for testing purposes.
⏰ 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: Prepare and validate pre-commit
🔇 Additional comments (6)
tests/components/plugwise/snapshots/test_binary_sensor.ambr (1)

14-14: LGTM! Consistent entity categorization updates.

The removal of DIAGNOSTIC categorization from user-facing operational state sensors (heating, cooling, DHW state, and Plugwise notifications) is appropriate. These sensors represent primary operational states that users need to monitor, not diagnostic information. Meanwhile, battery sensors and technical diagnostic sensors (compressor state, flame state, cooling enabled, secondary boiler state) correctly retain the DIAGNOSTIC category.

Also applies to: 163-163, 553-553, 649-649, 745-745, 841-841, 889-889

tests/components/plugwise/snapshots/test_select.ambr (2)

38-38: LGTM! Translation key prefixing for better namespacing.

The translation keys have been updated to use prefixed versions (select_gateway_mode and select_regulation_mode), which provides better namespacing and consistency with the integration's translation structure.

Also applies to: 99-99


144-144: LGTM! Appropriate CONFIG categorization for select entities.

The addition of EntityCategory.CONFIG for thermostat schedule entities is appropriate, as these are configuration controls that affect how the system operates rather than primary user controls. This aligns with Home Assistant's entity categorization guidelines where configuration entities should be grouped separately from primary controls.

Also applies to: 266-266, 389-389, 454-454, 519-519, 584-584

tests/components/plugwise/snapshots/test_sensor.ambr (3)

72-72: LGTM: removed DIAGNOSTIC → None for regular sensors.

This aligns snapshots with the intended entity classification cleanup. No functional risk.

Please confirm the same normalization landed in related snapshots (binary_sensor.ambr, select.ambr) for consistency.

Also applies to: 128-128, 181-181, 237-237, 349-349, 513-513, 569-569, 622-622, 678-678, 790-790, 1290-1290, 1346-1346, 1458-1458, 1510-1510, 1566-1566, 2071-2071, 2179-2179, 4280-4280, 4334-4334, 4390-4390, 4445-4445, 4610-4610, 5781-5781, 5837-5837, 5893-5893, 5947-5947, 6003-6003, 6059-6059, 6334-6334


293-317: Verify remaining DIAGNOSTIC sensors are intentional.

Kept as DIAGNOSTIC: temperature_difference, modulation_level, and OpenTherm water/outdoor/return telemetry. Looks correct; just confirm these are the only intended DIAGNOSTIC sensor classes.

Also applies to: 734-758, 2126-2147, 4501-4522, 4553-4577, 6166-6190, 6222-6246, 6278-6302


1-1: Snapshot updates verified—entity_category changes are correct and consistent.

Verification confirms that 12 sensors in test_sensor.ambr and 11 in test_binary_sensor.ambr correctly retain DIAGNOSTIC entity category (temperature readings, modulation levels, opentherm state/pressure sensors, battery status). All other sensors were appropriately changed to None. No missed or erroneous assignments detected.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@bouwew bouwew changed the title Fix missed snapshot update in #952 Fix missed snapshot updates in #952 Nov 10, 2025
@sonarqubecloud
Copy link

@bouwew bouwew marked this pull request as ready for review November 10, 2025 16:58
@bouwew bouwew requested a review from a team as a code owner November 10, 2025 16:58
@bouwew bouwew merged commit fbcccd6 into main Nov 10, 2025
13 checks passed
@bouwew bouwew deleted the test-diag branch November 10, 2025 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants