Skip to content

Commit f87d5b6

Browse files
authored
Remove default formula for active power and energy (#55)
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.
2 parents 4681c2b + bb331db commit f87d5b6

2 files changed

Lines changed: 1 addition & 13 deletions

File tree

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)