Skip to content

Commit 0e5efed

Browse files
Add ComponentMetricId.TEMPERATURE_MAX and the ability to retrieve this metric
Signed-off-by: Christian Parpart <[email protected]>
1 parent 5afc64d commit 0e5efed

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/frequenz/sdk/actor/_data_sourcing/microgrid_api_source.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ def get_channel_name(self) -> str:
8484
ComponentMetricId.CAPACITY: lambda msg: msg.capacity,
8585
ComponentMetricId.POWER_LOWER_BOUND: lambda msg: msg.power_lower_bound,
8686
ComponentMetricId.POWER_UPPER_BOUND: lambda msg: msg.power_upper_bound,
87+
ComponentMetricId.TEMPERATURE_MAX: lambda msg: msg.temperature_max,
8788
}
8889

8990
_InverterDataMethods: Dict[ComponentMetricId, Callable[[InverterData], float]] = {

src/frequenz/sdk/microgrid/component/_component.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,3 +139,5 @@ class ComponentMetricId(Enum):
139139

140140
ACTIVE_POWER_LOWER_BOUND = "active_power_lower_bound"
141141
ACTIVE_POWER_UPPER_BOUND = "active_power_upper_bound"
142+
143+
TEMPERATURE_MAX = "temperature_max"

0 commit comments

Comments
 (0)