@@ -240,8 +240,8 @@ async def list_single_component_data(
240240 microgrid_id : int ,
241241 component_id : int ,
242242 metrics : Metric | list [Metric ],
243- start_dt : datetime | None ,
244- end_dt : datetime | None ,
243+ start_time : datetime | None ,
244+ end_time : datetime | None ,
245245 resampling_period : timedelta | None ,
246246 include_states : bool = False ,
247247 include_bounds : bool = False ,
@@ -252,8 +252,8 @@ async def list_single_component_data(
252252 microgrid_id: The microgrid ID.
253253 component_id: The component ID.
254254 metrics: The metric name or list of metric names.
255- start_dt : start datetime, if None, the earliest available data will be used
256- end_dt : end datetime, if None starts streaming indefinitely from start_dt
255+ start_time : start datetime, if None, the earliest available data will be used
256+ end_time : end datetime, if None starts streaming indefinitely from start_time
257257 resampling_period: The period for resampling the data.
258258 include_states: Whether to include the state data.
259259 include_bounds: Whether to include the bound data.
@@ -266,8 +266,8 @@ async def list_single_component_data(
266266 async for batch in self ._list_microgrid_components_data_batch (
267267 microgrid_components = [(microgrid_id , [component_id ])],
268268 metrics = [metrics ] if isinstance (metrics , Metric ) else metrics ,
269- start_dt = start_dt ,
270- end_dt = end_dt ,
269+ start_time = start_time ,
270+ end_time = end_time ,
271271 resampling_period = resampling_period ,
272272 include_states = include_states ,
273273 include_bounds = include_bounds ,
@@ -281,8 +281,8 @@ async def list_microgrid_components_data(
281281 * ,
282282 microgrid_components : list [tuple [int , list [int ]]],
283283 metrics : Metric | list [Metric ],
284- start_dt : datetime | None ,
285- end_dt : datetime | None ,
284+ start_time : datetime | None ,
285+ end_time : datetime | None ,
286286 resampling_period : timedelta | None ,
287287 include_states : bool = False ,
288288 include_bounds : bool = False ,
@@ -293,8 +293,8 @@ async def list_microgrid_components_data(
293293 microgrid_components: List of tuples where each tuple contains
294294 microgrid ID and corresponding component IDs.
295295 metrics: The metric name or list of metric names.
296- start_dt : start datetime, if None, the earliest available data will be used
297- end_dt : end datetime, if None starts streaming indefinitely from start_dt
296+ start_time : start datetime, if None, the earliest available data will be used
297+ end_time : end datetime, if None starts streaming indefinitely from start_time
298298 resampling_period: The period for resampling the data.
299299 include_states: Whether to include the state data.
300300 include_bounds: Whether to include the bound data.
@@ -310,8 +310,8 @@ async def list_microgrid_components_data(
310310 async for batch in self ._list_microgrid_components_data_batch (
311311 microgrid_components = microgrid_components ,
312312 metrics = [metrics ] if isinstance (metrics , Metric ) else metrics ,
313- start_dt = start_dt ,
314- end_dt = end_dt ,
313+ start_time = start_time ,
314+ end_time = end_time ,
315315 resampling_period = resampling_period ,
316316 include_states = include_states ,
317317 include_bounds = include_bounds ,
@@ -326,8 +326,8 @@ async def _list_microgrid_components_data_batch(
326326 * ,
327327 microgrid_components : list [tuple [int , list [int ]]],
328328 metrics : list [Metric ],
329- start_dt : datetime | None ,
330- end_dt : datetime | None ,
329+ start_time : datetime | None ,
330+ end_time : datetime | None ,
331331 resampling_period : timedelta | None ,
332332 include_states : bool = False ,
333333 include_bounds : bool = False ,
@@ -337,8 +337,8 @@ async def _list_microgrid_components_data_batch(
337337 Args:
338338 microgrid_components: A list of tuples of microgrid IDs and component IDs.
339339 metrics: A list of metrics.
340- start_dt : start datetime, if None, the earliest available data will be used
341- end_dt : end datetime, if None starts streaming indefinitely from start_dt
340+ start_time : start datetime, if None, the earliest available data will be used
341+ end_time : end datetime, if None starts streaming indefinitely from start_time
342342 resampling_period: The period for resampling the data.
343343 include_states: Whether to include the state data.
344344 include_bounds: Whether to include the bound data.
@@ -357,8 +357,8 @@ def dt2ts(dt: datetime) -> PBTimestamp:
357357 return ts
358358
359359 time_filter = PBTimeFilter (
360- start = dt2ts (start_dt ) if start_dt else None ,
361- end = dt2ts (end_dt ) if end_dt else None ,
360+ start = dt2ts (start_time ) if start_time else None ,
361+ end = dt2ts (end_time ) if end_time else None ,
362362 )
363363
364364 incl_states = (
@@ -437,8 +437,8 @@ async def receive_single_sensor_data(
437437 microgrid_id : int ,
438438 sensor_id : int ,
439439 metrics : Metric | list [Metric ],
440- start_dt : datetime | None ,
441- end_dt : datetime | None ,
440+ start_time : datetime | None ,
441+ end_time : datetime | None ,
442442 resampling_period : timedelta | None ,
443443 include_states : bool = False ,
444444 ) -> AsyncIterator [MetricSample ]:
@@ -448,8 +448,8 @@ async def receive_single_sensor_data(
448448 microgrid_id: The microgrid ID.
449449 sensor_id: The sensor ID.
450450 metrics: The metric name or list of metric names.
451- start_dt : start datetime, if None, the earliest available data will be used.
452- end_dt : end datetime, if None starts streaming indefinitely from start_dt .
451+ start_time : start datetime, if None, the earliest available data will be used.
452+ end_time : end datetime, if None starts streaming indefinitely from start_time .
453453 resampling_period: The period for resampling the data.
454454 include_states: Whether to include the state data.
455455
@@ -461,8 +461,8 @@ async def receive_single_sensor_data(
461461 receiver = await self ._receive_microgrid_sensors_data_batch (
462462 microgrid_sensors = [(microgrid_id , [sensor_id ])],
463463 metrics = [metrics ] if isinstance (metrics , Metric ) else metrics ,
464- start_dt = start_dt ,
465- end_dt = end_dt ,
464+ start_time = start_time ,
465+ end_time = end_time ,
466466 resampling_period = resampling_period ,
467467 include_states = include_states ,
468468 )
@@ -476,8 +476,8 @@ async def receive_microgrid_sensors_data(
476476 * ,
477477 microgrid_sensors : list [tuple [int , list [int ]]],
478478 metrics : Metric | list [Metric ],
479- start_dt : datetime | None ,
480- end_dt : datetime | None ,
479+ start_time : datetime | None ,
480+ end_time : datetime | None ,
481481 resampling_period : timedelta | None ,
482482 include_states : bool = False ,
483483 ) -> AsyncIterator [MetricSample ]:
@@ -487,8 +487,8 @@ async def receive_microgrid_sensors_data(
487487 microgrid_sensors: List of tuples where each tuple contains
488488 microgrid ID and corresponding sensor IDs.
489489 metrics: The metric name or list of metric names.
490- start_dt : start datetime, if None, the earliest available data will be used.
491- end_dt : end datetime, if None starts streaming indefinitely from start_dt .
490+ start_time : start datetime, if None, the earliest available data will be used.
491+ end_time : end datetime, if None starts streaming indefinitely from start_time .
492492 resampling_period: The period for resampling the data.
493493 include_states: Whether to include the state data.
494494
@@ -503,8 +503,8 @@ async def receive_microgrid_sensors_data(
503503 receiver = await self ._receive_microgrid_sensors_data_batch (
504504 microgrid_sensors = microgrid_sensors ,
505505 metrics = [metrics ] if isinstance (metrics , Metric ) else metrics ,
506- start_dt = start_dt ,
507- end_dt = end_dt ,
506+ start_time = start_time ,
507+ end_time = end_time ,
508508 resampling_period = resampling_period ,
509509 include_states = include_states ,
510510 )
@@ -519,8 +519,8 @@ async def _receive_microgrid_sensors_data_batch(
519519 * ,
520520 microgrid_sensors : list [tuple [int , list [int ]]],
521521 metrics : list [Metric ],
522- start_dt : datetime | None ,
523- end_dt : datetime | None ,
522+ start_time : datetime | None ,
523+ end_time : datetime | None ,
524524 resampling_period : timedelta | None ,
525525 include_states : bool = False ,
526526 ) -> AsyncIterator [SensorsDataBatch ]:
@@ -529,8 +529,8 @@ async def _receive_microgrid_sensors_data_batch(
529529 Args:
530530 microgrid_sensors: A list of tuples of microgrid IDs and sensor IDs.
531531 metrics: A list of metrics.
532- start_dt : start datetime, if None, the earliest available data will be used.
533- end_dt : end datetime, if None starts streaming indefinitely from start_dt .
532+ start_time : start datetime, if None, the earliest available data will be used.
533+ end_time : end datetime, if None starts streaming indefinitely from start_time .
534534 resampling_period: The period for resampling the data.
535535 include_states: Whether to include the state data.
536536
@@ -548,8 +548,8 @@ def dt2ts(dt: datetime) -> PBTimestamp:
548548 return ts
549549
550550 time_filter = PBTimeFilter (
551- start = dt2ts (start_dt ) if start_dt else None ,
552- end = dt2ts (end_dt ) if end_dt else None ,
551+ start = dt2ts (start_time ) if start_time else None ,
552+ end = dt2ts (end_time ) if end_time else None ,
553553 )
554554
555555 incl_states = (
@@ -619,8 +619,8 @@ async def receive_aggregated_data(
619619 microgrid_id : int ,
620620 metric : Metric ,
621621 aggregation_formula : str ,
622- start : datetime | None ,
623- end : datetime | None ,
622+ start_time : datetime | None ,
623+ end_time : datetime | None ,
624624 resampling_period : timedelta ,
625625 ) -> AsyncIterator [MetricSample ]:
626626 """Iterate over aggregated data for a single metric using GrpcStreamBroadcaster.
@@ -630,8 +630,8 @@ async def receive_aggregated_data(
630630 microgrid_id: The microgrid ID.
631631 metric: The metric name.
632632 aggregation_formula: The aggregation formula.
633- start : start datetime, if None, the earliest available data will be used
634- end : end datetime, if None starts streaming indefinitely from start
633+ start_time : start datetime, if None, the earliest available data will be used
634+ end_time : end datetime, if None starts streaming indefinitely from start_time
635635 resampling_period: The period for resampling the data.
636636
637637 Yields:
@@ -655,8 +655,8 @@ def dt2ts(dt: datetime) -> PBTimestamp:
655655 return ts
656656
657657 time_filter = PBTimeFilter (
658- start = dt2ts (start ) if start else None ,
659- end = dt2ts (end ) if end else None ,
658+ start = dt2ts (start_time ) if start_time else None ,
659+ end = dt2ts (end_time ) if end_time else None ,
660660 )
661661
662662 stream_filter = PBAggregatedStreamRequest .AggregationStreamFilter (
0 commit comments