Skip to content

Commit bb331db

Browse files
committed
Remove default formula for active power and energy
With support for formulas derived from the component graph via assets API, this should not be used anymore to not silently default to a wrong formula. Signed-off-by: cwasicki <126617870+cwasicki@users.noreply.github.com>
1 parent 4681c2b commit bb331db

File tree

2 files changed

+1
-13
lines changed

2 files changed

+1
-13
lines changed

RELEASE_NOTES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ explicitly configured.
88
## Upgrading
99

1010
* Update assets client to v0.3.0.
11+
* Default formulas for AC active power and energy are removed.
1112

1213
## New Features
1314

src/frequenz/gridpool/_microgrid_config.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -51,19 +51,6 @@ def __post_init__(self) -> None:
5151
"please use 'AC_POWER_ACTIVE' instead."
5252
)
5353

54-
defaults = {
55-
"AC_POWER_ACTIVE",
56-
"AC_ENERGY_ACTIVE",
57-
"AC_ENERGY_ACTIVE_CONSUMED",
58-
"AC_ENERGY_ACTIVE_DELIVERED",
59-
}
60-
61-
for metric in defaults:
62-
if metric not in self.formula:
63-
self.formula[metric] = "+".join(
64-
[f"#{cid}" for cid in self._default_cids()]
65-
)
66-
6754
def cids(self, metric: str = "") -> list[int]:
6855
"""Get component IDs for this component.
6956

0 commit comments

Comments
 (0)