Skip to content

Commit 00b083d

Browse files
committed
Expose max battery block temperature through BatteryData objects
Signed-off-by: Sahas Subramanian <[email protected]>
1 parent fc1a3ef commit 00b083d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/frequenz/sdk/microgrid/component_data.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,8 @@ class BatteryData(ComponentData):
126126
power_upper_bound: the maximum charge power, in Watts, represented in the
127127
passive sign convention. This will be a positive number, or zero if no
128128
charging is possible.
129+
temperature_max: the maximum temperature of all the blocks in a battery, in
130+
Celcius (°C).
129131
"""
130132

131133
soc: float
@@ -134,6 +136,7 @@ class BatteryData(ComponentData):
134136
capacity: float
135137
power_lower_bound: float
136138
power_upper_bound: float
139+
temperature_max: float
137140

138141
@classmethod
139142
def from_proto(cls, raw: microgrid_pb.ComponentData) -> BatteryData:
@@ -154,6 +157,7 @@ def from_proto(cls, raw: microgrid_pb.ComponentData) -> BatteryData:
154157
capacity=raw.battery.properties.capacity,
155158
power_lower_bound=raw.battery.data.dc.power.system_bounds.lower,
156159
power_upper_bound=raw.battery.data.dc.power.system_bounds.upper,
160+
temperature_max=raw.battery.data.temperature.max,
157161
)
158162
battery_data._set_raw(raw=raw)
159163
return battery_data

0 commit comments

Comments
 (0)