diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index a5d1f3a7f..fec97aa02 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -3,3 +3,4 @@ ## Bug Fixes - Fix PV power distribution excluding inverters that haven't sent any data since the application started. +- Change consumer power formula to use 0 instead of None if any component is not sending data. Now power is sum of power in all working components. diff --git a/src/frequenz/sdk/timeseries/formula_engine/_formula_generators/_consumer_power_formula.py b/src/frequenz/sdk/timeseries/formula_engine/_formula_generators/_consumer_power_formula.py index 87c65689b..d64a12771 100644 --- a/src/frequenz/sdk/timeseries/formula_engine/_formula_generators/_consumer_power_formula.py +++ b/src/frequenz/sdk/timeseries/formula_engine/_formula_generators/_consumer_power_formula.py @@ -181,7 +181,7 @@ def consumer_component(component: Component) -> bool: builder.push_component_metric( component.component_id, - nones_are_zeros=component.category != ComponentCategory.METER, + nones_are_zeros=True, ) return builder.build()