Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.2.4] - 03/2026

### Fixed

- **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. The value is now normalized to positive zero after negation.

## [2.2.3] - 03/2026

### Changed
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "span-panel-api"
version = "2.2.3"
version = "2.2.4"
description = "A client library for SPAN Panel API"
authors = [
{name = "SpanPanel"}
Expand Down
2 changes: 1 addition & 1 deletion src/span_panel_api/mqtt/homie.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ def _build_circuit(self, node_id: str, device_type: str = "circuit", relative_po

# active-power is in watts; negate so positive = consumption
raw_power_w = _parse_float(self._get_prop(node_id, "active-power"))
instant_power_w = -raw_power_w
instant_power_w = -raw_power_w or 0.0

# Energy: exported-energy = consumption (panel exports TO circuit)
consumed_wh = _parse_float(self._get_prop(node_id, "exported-energy"))
Expand Down