Skip to content

Commit c67fa1d

Browse files
Change zero to nan for lack of data
Signed-off-by: Flora <[email protected]>
1 parent e927deb commit c67fa1d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

RELEASE_NOTES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414

1515
## Bug Fixes
1616

17-
<!-- Here goes notable bug fixes that are worth a special mention or explanation -->
17+
* Change 0.0 to nan if there is no data available

src/frequenz/reporting/_reporting.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ async def cumulative_energy(
114114
elif last_value_diff < 0:
115115
production += last_value_diff
116116
else:
117-
consumption = production = 0.0
117+
consumption = production = float("nan")
118118

119119
return CumulativeEnergy(
120120
start_time=start_time,

0 commit comments

Comments
 (0)