| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## master #1751 +/- ##
=======================================
Coverage 93.29% 93.29%
=======================================
Files 157 157
Lines 9932 9933 +1
Branches 1022 1023 +1
=======================================
+ Hits 9266 9267 +1
Misses 471 471
Partials 195 195 ☔ View full report in Codecov by Harness.
|
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks for the PR, @YouCanCallMeAl! Please take a look at my comment about hardcoding the model, and please feel free to create a separate PR to add the fixture as that is something we could commit immediately.
Sorry, something went wrong.
| # P410M returns malformed JSON from get_emeter_data while | ||
| # reporting reverse/solar-export power. get_energy_usage | ||
| # provides signed milliwatt current_power instead. | ||
| if self._device.model != "P410M": | ||
| req["get_emeter_data"] = None |
There was a problem hiding this comment.
Where does the invalid data break the handling? Instead of hardcoding a model (whose firmware might be updated later on to fix this), I would rather try to catch the error case in a generic way.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Summary
Fixes P410M energy updates when the plug measures reverse power flow from a solar/microinverter source.
The P410M returns malformed JSON for the legacy get_emeter_data request while reporting negative power. This causes the Smart Energy module update to fail and Home Assistant to mark all energy entities unavailable.
The P410M provides valid signed power through get_energy_usage.current_power, so avoid requesting get_emeter_data for this model.
Changes
Device tested
Tests
Fixes #1709