Add yearly energy data and heat/cool breakdown for BRP084 devices - #119
Open
ryceg wants to merge 3 commits into
Open
Add yearly energy data and heat/cool breakdown for BRP084 devices#119ryceg wants to merge 3 commits into
ryceg wants to merge 3 commits into
Conversation
The DSIOT year_power endpoint and week_power datas2 field weren't being queried, so firmware 2.8.0 devices reported no yearly totals and no heat/cool split for daily/weekly energy usage. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The heat = total - cool derivation from datas/datas2 is only valid when the adapter reports combined metering (en_ipw_sep != 1). Read the flag from adp_i and skip the derivation on separate-metering units to avoid emitting wrong per-mode figures. Also extract the energy parsing out of update_status into _extract_energy / _extract_heat_cool_breakdown / _extract_yearly_energy helpers so the method stays within pylint's branch/statement limits. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #119 +/- ##
==========================================
+ Coverage 84.14% 84.83% +0.69%
==========================================
Files 12 12
Lines 1198 1240 +42
==========================================
+ Hits 1008 1052 +44
+ Misses 190 188 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Owner
|
Please update with tests to cover your changes. |
…-cool-energy-data
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.
Summary
year_powerendpoint (this_year/previous_year) in addition to the existingweek_powerrequestdatas2(cooling) series fromweek_powerand derivecurr_day_cool/curr_day_heatandprev_1day_cool/prev_1day_heatby subtracting cooling energy from the total energy already parsed intodatastry/except DaikinExceptionblocks so devices/firmware that don't expose these fields keep working as beforeTest plan
this_year/previous_year/datas2populate correctlyyear_power/datas2support still update status without errors🤖 Generated with Claude Code