1515from frequenz .client .base import channel
1616from frequenz .client .base .client import BaseApiClient , call_stub_method
1717from frequenz .client .common .microgrid import MicrogridId
18+ from frequenz .client .common .microgrid .electrical_components import ElectricalComponentId
1819
1920from ._microgrid import Microgrid
2021from ._microgrid_proto import microgrid_from_proto
@@ -144,8 +145,8 @@ async def list_microgrid_electrical_components(
144145 async def list_microgrid_electrical_component_connections (
145146 self ,
146147 microgrid_id : MicrogridId ,
147- source_component_ids : Iterable [int ] = (),
148- destination_component_ids : Iterable [int ] = (),
148+ source_component_ids : Iterable [ElectricalComponentId ] = (),
149+ destination_component_ids : Iterable [ElectricalComponentId ] = (),
149150 ) -> list [ComponentConnection | None ]:
150151 """
151152 Get the electrical component connections of a microgrid.
@@ -163,8 +164,8 @@ async def list_microgrid_electrical_component_connections(
163164 """
164165 request = assets_pb2 .ListMicrogridElectricalComponentConnectionsRequest (
165166 microgrid_id = int (microgrid_id ),
166- source_component_ids = source_component_ids ,
167- destination_component_ids = destination_component_ids ,
167+ source_component_ids = ( int ( c ) for c in source_component_ids ) ,
168+ destination_component_ids = ( int ( c ) for c in destination_component_ids ) ,
168169 )
169170
170171 response = await call_stub_method (
0 commit comments