Skip to content

Conversation

@bouwew
Copy link
Contributor

@bouwew bouwew commented Nov 6, 2025

Summary by CodeRabbit

  • Style

    • Standardized display names for electricity consumption and production metrics (consumed, produced, point, cumulative) to the hyphenated "off-peak" format across the user interface and English translations.
  • Documentation

    • Added changelog entry noting the string alignment update.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 6, 2025

Walkthrough

String values in Plugwise integration files and tests were updated to use the hyphenated form "off-peak" instead of "off peak" for electricity consumption and production metric display names. No logic or control flow was changed.

Changes

Cohort / File(s) Summary
Core strings
custom_components/plugwise/strings.json
Updated multiple sensor display strings to use hyphenated "off-peak" (e.g., "Electricity consumed off peak ..." → "Electricity consumed off-peak ...").
English translations
custom_components/plugwise/translations/en.json
Mirrored updates to English translation display values to use "off-peak" for consumption and production metrics.
Tests / snapshots
tests/components/plugwise/snapshots/test_sensor.ambr
Updated snapshot entries (original_name and friendly_name) to reflect "off-peak" hyphenation across affected sensors.
Changelog
CHANGELOG.md
Added changelog entry referencing alignment of strings with Core Plugwise strings.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Check consistent hyphenation across listed files and any other translation files.
  • Verify tests/snapshots align with updated display names and run tests to ensure no snapshot mismatches remain.

Suggested labels

downstreaming

Suggested reviewers

  • CoMPaTech

Poem

🐰✨ I hopped through strings with nimble flair,
A tiny dash placed here and there,
Off-peak now sings with hyphen bright,
Small change, neat chorus in the night,
— carrots and code, all cozy and right.

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 'Line up strings with Core Plugwise strings' directly aligns with the main change in the PR, which updates display strings throughout multiple files to match Core Plugwise conventions (specifically changing 'off peak' to 'off-peak').
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 core-strings

📜 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 4cccafb and c1cb863.

📒 Files selected for processing (2)
  • CHANGELOG.md (1 hunks)
  • tests/components/plugwise/snapshots/test_sensor.ambr (36 hunks)
✅ Files skipped from review due to trivial changes (1)
  • CHANGELOG.md
🧰 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). (2)
  • GitHub Check: Setup for HA-core (release/master)
  • GitHub Check: Setup for HA-core (dev)
🔇 Additional comments (2)
tests/components/plugwise/snapshots/test_sensor.ambr (2)

4681-4696: Hyphenation aligned — looks good

“off-peak” is consistently applied in both original_name and friendly_name; translation_key remains off_peak. No functional impact.

Also applies to: 4737-4752, 4793-4808, 5129-5144, 5185-5200, 5241-5256, 6462-6477, 6518-6533, 6574-6589, 7134-7149, 7190-7205, 7246-7261, 7859-7874, 7914-7929, 7970-7985, 8306-8321, 8362-8377, 8418-8433


4681-4696: Changes verified and complete — all checks passed

Verification confirms:

  • No remaining "off peak" (space) found anywhere in the codebase
  • All Plugwise translation strings consistently use "off-peak" (hyphenated form)
  • Snapshots have been properly updated

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 Line up string with Core Plugwise strings Line up strings with Core Plugwise strings Nov 6, 2025
@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 6, 2025

@bouwew bouwew marked this pull request as ready for review November 6, 2025 18:29
@bouwew bouwew requested a review from a team as a code owner November 6, 2025 18:29
@bouwew bouwew merged commit 3fed978 into main Nov 7, 2025
13 checks passed
@bouwew bouwew deleted the core-strings branch November 7, 2025 07:03
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.

3 participants