Skip to content

fix: normalize negative zero on idle circuit power#115

Merged
cayossarian merged 2 commits intomainfrom
sign_fixes
Mar 11, 2026
Merged

fix: normalize negative zero on idle circuit power#115
cayossarian merged 2 commits intomainfrom
sign_fixes

Conversation

@cayossarian
Copy link
Member

Summary

  • Negative zero on idle circuits — Circuit power negation (-raw_power_w) produced IEEE 754 -0.0 when the panel reported 0.0 for an idle circuit, causing HA to display -0W instead of 0W. The value is now normalized to positive zero after negation. (#185)
  • Version bump to 2.2.4

Test plan

  • Verify idle circuits show 0W not -0W
  • CI passes

Circuit power negation (-raw_power_w) produced IEEE 754 -0.0 when
the panel reported 0.0 for an idle circuit, causing HA to display
-0W instead of 0W. The result is now normalized with `or 0.0`.

Fixes SpanPanel/span#185
@cayossarian cayossarian merged commit f51e3c4 into main Mar 11, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant