Skip to content

Conversation

@swoboda1337
Copy link
Member

Description:

Changes to content/cookbook/power_meter.md:

  1. Line 133: Changed pulse_counter.set_total_pulses → pulse_meter.set_total_pulses
  • The cookbook uses pulse_meter sensor, so it needs the matching action
  1. Line 149: Changed power_id: sensor_energy_pulse_meter → power_id: sensor_pulse_meter
  • Fixes reference to match the sensor ID defined on line 42

Fixes: #5543

Related issue (if applicable): fixes

Pull request in esphome with YAML changes (if applicable):

  • esphome/esphome#

Checklist:

  • I am merging into next because this is new documentation that has a matching pull-request in esphome as linked above.
    or

  • I am merging into current because this is a fix, change and/or adjustment in the current documentation and is not for a new component or feature.

  • Link added in /components/index.rst when creating new documents for new components or cookbook.

New Component Images

If you are adding a new component to ESPHome, you can automatically generate a standardized black and white component name image for the documentation.

To generate a component image:

  1. Comment on this pull request with the following command, replacing COMPONENT_NAME with your component name in UPPER_CASE format with underscores (e.g., BME280, SHT3X, DALLAS_TEMP):

    @esphomebot generate image COMPONENT_NAME
    
  2. The ESPHome bot will respond with a downloadable ZIP file containing the SVG image.

  3. Extract the SVG file and place it in the images/ folder of this repository.

  4. Use the image in your component's index table entry in /components/index.rst.

Example: For a component called "DHT22 Temperature Sensor", use:

@esphomebot generate image DHT22

- Change `pulse_counter.set_total_pulses` to `pulse_meter.set_total_pulses`
  (the cookbook uses pulse_meter, not pulse_counter)
- Change `power_id: sensor_energy_pulse_meter` to `power_id: sensor_pulse_meter`
  (matches the sensor ID defined earlier in the cookbook)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@esphome esphome bot added the current label Dec 4, 2025
@netlify
Copy link

netlify bot commented Dec 4, 2025

Deploy Preview for esphome ready!

Name Link
🔨 Latest commit 2873361
🔍 Latest deploy log https://app.netlify.com/projects/esphome/deploys/69310cc471e6c300082fd7ac
😎 Deploy Preview https://deploy-preview-5721--esphome.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 4, 2025

Walkthrough

Documentation corrections in the power meter cookbook: updated incorrect entity references from pulse_counter.set_total_pulses to pulse_meter.set_total_pulses and changed the power meter configuration power_id reference from sensor_energy_pulse_meter to sensor_pulse_meter to reflect actual available entities.

Changes

Cohort / File(s) Summary
Power meter documentation corrections
content/cookbook/power_meter.md
Fixed two incorrect entity references in example configurations: (1) action target changed from non-existent pulse_counter to correct pulse_meter entity for set_total_pulses action; (2) power_id reference updated from sensor_energy_pulse_meter to sensor_pulse_meter in Total Daily Energy configuration

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

  • Straightforward documentation corrections addressing non-existent entity references
  • Limited scope: single file with two localized, factual corrections
  • No logic changes or structural modifications

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main changes: fixing two erroneous references in the power_meter cookbook (action and sensor ID references).
Description check ✅ Passed The description is directly related to the changeset, clearly explaining the two line-specific fixes and their rationale with references to the linked issue.
Linked Issues check ✅ Passed The pull request successfully addresses both objectives from issue #5543: replacing pulse_counter.set_total_pulses with pulse_meter.set_total_pulses [line 133], and correcting the power_id reference from sensor_energy_pulse_meter to sensor_pulse_meter [line 149].
Out of Scope Changes check ✅ Passed All changes are directly scoped to fixing the two identified issues in the power_meter cookbook documentation; no extraneous modifications are present.
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

📜 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 f5986ca and 2873361.

📒 Files selected for processing (1)
  • content/cookbook/power_meter.md (2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**

⚙️ CodeRabbit configuration file

  • Do not generate or add any sequence diagrams

Files:

  • content/cookbook/power_meter.md
⏰ 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: Build
🔇 Additional comments (2)
content/cookbook/power_meter.md (2)

130-136: ✓ Correct action component reference.

The action target is now correctly set to pulse_meter.set_total_pulses matching the pulse_meter sensor platform configured at line 40, rather than the non-existent pulse_counter component in this context. The sensor ID reference is also correct.


146-156: ✓ Sensor ID reference corrected.

The power_id now correctly references sensor_pulse_meter, which matches the sensor ID defined at line 42. The previous reference to sensor_energy_pulse_meter was undefined and would cause a configuration error.


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.

@swoboda1337 swoboda1337 merged commit 8a86a09 into esphome:current Dec 4, 2025
6 checks passed
@swoboda1337
Copy link
Member Author

Thanks

@swoboda1337 swoboda1337 mentioned this pull request Dec 5, 2025
swoboda1337 added a commit that referenced this pull request Dec 5, 2025
- Change `pulse_counter.set_total_pulses` to `pulse_meter.set_total_pulses`
  (the cookbook uses pulse_meter, not pulse_counter)
- Change `power_id: sensor_energy_pulse_meter` to `power_id: sensor_pulse_meter`
  (matches the sensor ID defined earlier in the cookbook)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Power meter some small issues

2 participants