You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Fixed
jackery_home_power could show negative values: The base formula p_home = p_grid - p_ong can temporarily yield a negative result when the SmartMeter (type-101) and SolarVault (type-2) are sampled at different moments — e.g. when grid_sell momentarily exceeds ongrid_supply due to asynchronous sensor updates. House loads are physically never negative, so any negative result is a measurement artefact. Added max(0.0, p_home) clamp after all formula branches. Grid charging (inOngridPw > 0) is correctly handled by the formula itself and does not produce negative values.