Skip to content

Conversation

@bouwew
Copy link
Contributor

@bouwew bouwew commented Oct 19, 2025

Summary by CodeRabbit

  • New Features

    • Added support for Emma Pro and Jip thermostat devices and updated related device/state values.
  • Chores

    • Bumped integration to v0.58.2 and updated Plugwise dependency to v1.8.2.
    • Added changelog entry for v0.58.2.
  • Tests

    • Updated test fixtures, snapshots, and expected registry counts to reflect new devices and adjusted sensor/preset values.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 19, 2025

Warning

Rate limit exceeded

@bouwew has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 1 minutes and 32 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 24fc450 and 6cc3098.

📒 Files selected for processing (2)
  • CHANGELOG.md (1 hunks)
  • custom_components/plugwise/manifest.json (1 hunks)

Walkthrough

Bumps integration and project version to 0.58.2, updates plugwise dependency to 1.8.2, adds changelog entry, and refreshes multiple Plugwise test fixtures/snapshots to include new Emma/Jip devices and updated sensor/state data.

Changes

Cohort / File(s) Summary
Version & metadata
CHANGELOG.md, custom_components/plugwise/manifest.json, pyproject.toml
Bump integration version to 0.58.2 and plugwise dependency to 1.8.2; add changelog entry documenting Emma-related updates.
Fixture updates — adam/anna
tests/components/plugwise/fixtures/adam_plus_anna_new/data.json
Updated many sensor numeric values, added vendor/zigbee_mac fields, updated gateway firmware/MAC, expanded primary thermostat associations, and added new Emma Pro and Jip device entries.
Fixture updates — m_adam_cooling/heating
tests/components/plugwise/fixtures/m_adam_cooling/data.json, tests/components/plugwise/fixtures/m_adam_heating/data.json
Add Emma/Jip devices; update device battery, setpoint, temperature, zigbee_mac_address, firmware, regulation_modes order, schedule/preset order, and electricity values; adjust thermostat primary lists.
Snapshots
tests/components/plugwise/snapshots/test_climate.ambr, tests/components/plugwise/snapshots/test_select.ambr
Update preset_modes to include vacation, reorder select options (regulation modes, schedules), and refresh snapshot state values to match fixture changes.
Tests
tests/components/plugwise/test_init.py
Increase expected entity/device registry counts to account for added devices/entries.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant Tests as Test Suite
  participant Fixtures as Fixture JSON
  participant Integration as Plugwise Integration
  participant Library as plugwise lib (v1.8.2)
  participant Entities as HA Entities/Registry

  rect rgb(220, 235, 255)
    Note over Tests,Fixtures: Test data updated to include Emma/Jip and new states
  end

  Tests->>Fixtures: load updated fixture data
  Fixtures->>Integration: provide device/gateway snapshots
  Integration->>Library: parse device data (new models/zigbee fields)
  Library-->>Integration: device objects / updated fields
  Integration->>Entities: create/update entities and device registry entries
  Entities-->>Tests: assertions (updated counts/snapshots)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested labels

enhancement

Suggested reviewers

  • CoMPaTech

Poem

🐰 I hopped through fixtures, bright and spry,
Emma and Jip now blink an eye,
Values tuned and presets sung,
Version bumped — the tests that sprung,
Hooray — new devices in the sky! ✨

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 "More Emma related updates" is partially related to the changeset. It refers to a real aspect of the changes, as the pull request does add and update Emma device data (specifically adding Emma Pro and Emma devices in test fixtures), and the CHANGELOG entry explicitly mentions "Emma related updates via plugwise v1.8.2". However, the title does not fully capture the scope of the changeset, which primarily consists of a version bump to 0.58.2, a plugwise dependency update from 1.8.1 to 1.8.2, and extensive test fixture and snapshot updates that go beyond just Emma (including new Jip device, gateway firmware updates, preset mode changes, and various sensor value adjustments). According to the evaluation criteria, partial relatedness to a real aspect of the changeset constitutes a pass.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.

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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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)
CHANGELOG.md (1)

5-7: LGTM! Consider optional grammar improvement.

The changelog entry is clear and follows the existing format. Static analysis suggests hyphenating "Emma related" to "Emma-related" for consistency with standard English style guides, but this is a minor stylistic preference.

Based on learnings: Static analysis hint.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7739464 and 6952530.

📒 Files selected for processing (9)
  • CHANGELOG.md (1 hunks)
  • custom_components/plugwise/manifest.json (1 hunks)
  • pyproject.toml (1 hunks)
  • tests/components/plugwise/fixtures/adam_plus_anna_new/data.json (13 hunks)
  • tests/components/plugwise/fixtures/m_adam_cooling/data.json (9 hunks)
  • tests/components/plugwise/fixtures/m_adam_heating/data.json (8 hunks)
  • tests/components/plugwise/snapshots/test_climate.ambr (4 hunks)
  • tests/components/plugwise/snapshots/test_select.ambr (7 hunks)
  • tests/components/plugwise/test_init.py (3 hunks)
🧰 Additional context used
🪛 LanguageTool
CHANGELOG.md

[grammar] ~7-~7: Use a hyphen to join words.
Context: ...rom 0.40 and up ## v0.58.2 - More Emma related updates via plugwise [v1.8.2](ht...

(QB_NEW_EN_HYPHEN)

⏰ 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 (22)
custom_components/plugwise/manifest.json (1)

10-11: LGTM! Version and dependency updates are consistent.

The version bump to 0.58.2 and plugwise dependency update to 1.8.2 align correctly with the changelog entry and the Emma-related updates in this PR.

pyproject.toml (1)

3-3: LGTM! Version bump is consistent.

The project version update to 0.58.2 matches the integration manifest and changelog.

tests/components/plugwise/fixtures/m_adam_heating/data.json (5)

33-58: LGTM! New Emma Pro device fixture added.

The Emma Pro device fixture is properly structured with all necessary fields including zone_thermostat data, sensors (battery, humidity, setpoint, temperature), temperature_offset configuration, and Zigbee MAC address.


122-142: LGTM! New Jip device fixture added.

The Jip zone_thermometer fixture includes appropriate device metadata, sensor readings, and Zigbee MAC address for testing the new device support.


59-86: LGTM! Device attribute updates align with Emma support.

The updates to existing devices (Tom Badkamer, Gateway, Lisa Badkamer) including battery levels, setpoints, MAC addresses, firmware version, and regulation mode ordering are consistent with the test fixture refresh for Emma device support.

Also applies to: 99-121, 143-168


182-217: LGTM! Zone configuration updated for new thermostats.

The Living room ThermoZone correctly expands the primary thermostats list to include the new Emma and Jip devices alongside the existing Anna thermostat. The preset_modes reordering (vacation moved to first position) and schedule updates are consistent across the fixture.


219-251: LGTM! Bathroom zone updated with vacation preset.

The Bathroom zone's active_preset change to "vacation" and select_schedule change to "off" are consistent with the test scenario updates. The preset_modes reordering matches the Living room updates.

tests/components/plugwise/fixtures/adam_plus_anna_new/data.json (2)

39-64: LGTM! Emma and Jip devices added consistently.

The Emma Pro and Jip device fixtures in this test scenario mirror the structure from m_adam_heating with appropriately different sensor values for this specific test case (adam_plus_anna_new). The device configurations are consistent and properly formed.

Also applies to: 207-227


65-92: LGTM! Test fixture updates are comprehensive and consistent.

All device attribute updates (sensor readings, MAC addresses, firmware, regulation modes, zone configurations) align with the Emma device support refresh and maintain consistency with the parallel m_adam_heating fixture updates.

Also applies to: 184-206, 228-253, 267-336

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

2-84: LGTM! Climate snapshots updated for vacation preset support.

The test snapshots correctly reflect the addition of the "vacation" preset to preset_modes lists and the Bathroom climate entity's preset_mode state change to "vacation", matching the fixture updates in data.json.


86-168: LGTM! Living room climate snapshot updated consistently.

The Living room climate entity snapshot includes the vacation preset in preset_modes while maintaining the "home" preset_mode state, consistent with the fixture data.

tests/components/plugwise/test_init.py (3)

298-305: LGTM! Registry count expectations updated for Emma and Jip devices.

The updated expectations (49 entities and 10 devices, increased from 38 and 8) correctly account for the addition of Emma Pro and Jip devices in the test fixtures.


322-329: LGTM! Registry counts reflect adding a second Tom device.

The expectations (56 entities and 11 devices) correctly reflect the addition of the second Tom/Floor device to the test scenario.


349-356: LGTM! Registry counts correctly reflect device removal.

The expectations (49 entities and 10 devices) correctly return to the baseline plus Emma/Jip after removing the original Tom Badkamer device.

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

61-122: LGTM! Regulation mode snapshot reflects fixture option reordering.

The Adam regulation_mode select entity snapshot correctly reflects the reordered regulation_modes from the fixture data, with "off" and "bleeding_hot" swapped in the options list.


124-185: LGTM! Thermostat schedule snapshots updated consistently.

The Bathroom thermostat schedule snapshot includes the "Test" schedule option and reflects the state change to "off", matching the fixture updates in data.json.


187-248: LGTM! Living room schedule snapshot includes Test option.

The Living room thermostat schedule snapshot correctly includes the "Test" schedule in the options list, consistent with the available_schedules updates in the fixture data.

tests/components/plugwise/fixtures/m_adam_cooling/data.json (5)

28-53: Good: New Emma device fixture added with complete metadata.

The new zone_thermostat device (Emma Pro) is properly configured with all required fields: hardware, location, model metadata, sensors (battery, humidity, setpoint, temperature), and temperature_offset control. The zigbee_mac_address format is consistent with other devices in the fixture.


123-143: Good: New Jip device fixture added.

The zone_thermometer device (Jip) is properly configured with firmware, location, and sensor readings. UUID and MAC address format are consistent with other devices.


67-80: Good: Consistent device updates across fixtures.

Existing devices (Tom Badkamer, Adam, Lisa Badkamer) have been refreshed with:

  • Updated sensor readings (battery, setpoint, temperature)
  • Refreshed firmware and MAC addresses
  • New zigbee_mac_address values following the 16-character hex format

All changes appear intentional and maintain data consistency.

Also applies to: 99-122, 147-169


197-197: Good: Climate zones updated to reflect new device structure.

  • Living room now includes Emma and Jip as primary thermostats alongside Anna
  • Preset modes reordered with vacation first (consistent in both zones)
  • Available schedules include all expected entries

This aligns with the PR objective of adding Emma support.

Also applies to: 211-215, 234-234


28-252: Verify: Test suite passes with updated fixture data.

This fixture file update is comprehensive and touches multiple device entries and climate zones. Ensure:

  • All affected unit tests pass with the new device entries (Emma, Jip)
  • Snapshot tests mentioned in the AI summary reflect these changes
  • No downstream test fixtures (adam_plus_anna_new, adam_heating) have become inconsistent
  • Registry entity count expectations in test_init.py align with the added devices

@bouwew bouwew marked this pull request as ready for review October 23, 2025 17:52
@bouwew bouwew requested a review from a team as a code owner October 23, 2025 17:52
@sonarqubecloud
Copy link

@bouwew bouwew merged commit 3012703 into main Oct 23, 2025
13 checks passed
@bouwew bouwew deleted the pw-1.8.2 branch October 23, 2025 18:25
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