Skip to content

Commit c359d3f

Browse files
committed
Update DataSourcingActor to accept current requests for inverters
In some component configurations, it might be necessary to use current readings from inverters to calculate grid current. Signed-off-by: Sahas Subramanian <[email protected]>
1 parent e54f142 commit c359d3f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@
6969
ComponentMetricId.ACTIVE_POWER_INCLUSION_UPPER_BOUND: lambda msg: (
7070
msg.active_power_inclusion_upper_bound
7171
),
72+
ComponentMetricId.CURRENT_PHASE_1: lambda msg: msg.current_per_phase[0],
73+
ComponentMetricId.CURRENT_PHASE_2: lambda msg: msg.current_per_phase[1],
74+
ComponentMetricId.CURRENT_PHASE_3: lambda msg: msg.current_per_phase[2],
7275
ComponentMetricId.FREQUENCY: lambda msg: msg.frequency,
7376
}
7477

0 commit comments

Comments
 (0)