Skip to content

Commit c4703a4

Browse files
committed
Update MarketLocationIdType enum mapping to match latest API
The generated protobuf code in the latest API release has removed the 'OFFICIAL_' prefix from the market location ID type enum members. This commit updates the client mapping to match the new names. Signed-off-by: Mathias L. Baumann <[email protected]>
1 parent d321a8c commit c4703a4

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/frequenz/client/marketmetering/_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ async def stream_samples(
201201
"""
202202
# Build the request
203203
request = pb.ReceiveMarketLocationSamplesStreamRequest(
204-
market_location_list=[ml.to_protobuf() for ml in market_locations],
204+
market_location_refs=[ml.to_protobuf() for ml in market_locations],
205205
directions=[d.value for d in directions],
206206
metric_types=[mt.value for mt in metric_types],
207207
)
@@ -314,7 +314,7 @@ def _get_stream(
314314
if broadcaster is None:
315315
# Build the request
316316
request = pb.ReceiveMarketLocationSamplesStreamRequest(
317-
market_location_list=[ml.to_protobuf() for ml in market_locations],
317+
market_location_refs=[ml.to_protobuf() for ml in market_locations],
318318
directions=[d.value for d in directions],
319319
metric_types=[mt.value for mt in metric_types],
320320
)

src/frequenz/client/marketmetering/types.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,22 +40,22 @@ class MarketArea(Enum):
4040
class MarketLocationIdType(Enum):
4141
"""Type of external market identifier."""
4242

43-
UNSPECIFIED = pb.OFFICIAL_MARKET_LOCATION_ID_TYPE_UNSPECIFIED
43+
UNSPECIFIED = pb.MARKET_LOCATION_ID_TYPE_UNSPECIFIED
4444
"""Unspecified identifier type."""
4545

46-
MALO_ID = pb.OFFICIAL_MARKET_LOCATION_ID_TYPE_MALO_ID
46+
MALO_ID = pb.MARKET_LOCATION_ID_TYPE_MALO_ID
4747
"""Germany – Marktlokations-ID (MaLo-ID)."""
4848

49-
MPAN = pb.OFFICIAL_MARKET_LOCATION_ID_TYPE_MPAN
49+
MPAN = pb.MARKET_LOCATION_ID_TYPE_MPAN
5050
"""United Kingdom – Meter Point Administration Number."""
5151

52-
ESI_ID = pb.OFFICIAL_MARKET_LOCATION_ID_TYPE_ESI_ID
52+
ESI_ID = pb.MARKET_LOCATION_ID_TYPE_ESI_ID
5353
"""United States – Electric Service Identifier (ESI ID)."""
5454

55-
NMI = pb.OFFICIAL_MARKET_LOCATION_ID_TYPE_NMI
55+
NMI = pb.MARKET_LOCATION_ID_TYPE_NMI
5656
"""Australia – National Metering Identifier."""
5757

58-
OTHER = pb.OFFICIAL_MARKET_LOCATION_ID_TYPE_OTHER
58+
OTHER = pb.MARKET_LOCATION_ID_TYPE_OTHER
5959
"""Generic meter identifier for markets not modeled explicitly."""
6060

6161

0 commit comments

Comments
 (0)