Repository navigation
Conversation
External CT Power (register 172) had device_class: power but no state_class, so Home Assistant kept no long-term statistics for it. Add state_class: measurement to match the other power sensors. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdds Home Assistant's measurement state class to the single-phase hybrid inverter External CT Power sensor (register 172), allowing long-term statistics, statistics graphs, and Riemann-sum Energy dashboard integrations. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Bonabrux
added a commit
to Bonabrux/esphome-deye-inverter
that referenced
this pull request
Oct 14, 2026
… 3389-1515) New entry point pv_inverter/deye_hybrid_1p_lv_v118.yaml next to the existing 1P one, so users on older firmwares are unaffected. Reuses inverter/load/pv from deye_hybrid_1p; includes the AC power ratio scaling (Lewa-Reka#123), External CT Power state_class (Lewa-Reka#152) and Battery Current scale (Lewa-Reka#128) fixes. Shared-register switches (248, 274-279, 280, 326) write via read-modify-write so toggling one bit no longer clears the others.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds
state_class: "measurement"to the External CT Power sensor (register 172)for single-phase hybrid inverters.
Without a
state_class, Home Assistant doesn't record long-term statistics for thissensor, so it can't be used in the Energy dashboard (e.g. via a Riemann sum integration)
or in statistics graphs. This matches the other power sensors that already got a
state_classin #116.Changes relate to
🤖 Generated with Claude Code
Summary by Sourcery
Bug Fixes: