Skip to content

Commit 6a2ab86

Browse files
Merge pull request #12 from flora-hofmann-frequenz/zero_change
Change zero to nan for lack of data
2 parents 931627c + c67fa1d commit 6a2ab86

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)