Skip to content

metrics

frequenz.client.microgrid.metrics ¤

Metrics definitions.

Classes¤

frequenz.client.microgrid.metrics.AggregatedMetricValue dataclass ¤

Encapsulates derived statistical summaries of a single metric.

The message allows for the reporting of statistical summaries — minimum, maximum, and average values - as well as the complete list of individual samples if available.

This message represents derived metrics and contains fields for statistical summaries—minimum, maximum, and average values. Individual measurements are are optional, accommodating scenarios where only subsets of this information are available.

Source code in frequenz/client/microgrid/metrics/_sample.py
@dataclass(frozen=True, kw_only=True)
class AggregatedMetricValue:
    """Encapsulates derived statistical summaries of a single metric.

    The message allows for the reporting of statistical summaries — minimum,
    maximum, and average values - as well as the complete list of individual
    samples if available.

    This message represents derived metrics and contains fields for statistical
    summaries—minimum, maximum, and average values. Individual measurements are
    are optional, accommodating scenarios where only subsets of this information
    are available.
    """

    avg: float
    """The derived average value of the metric."""

    min: float | None
    """The minimum measured value of the metric."""

    max: float | None
    """The maximum measured value of the metric."""

    raw_values: Sequence[float]
    """All the raw individual values (it might be empty if not provided by the component)."""

    def __str__(self) -> str:
        """Return the short string representation of this instance."""
        extra: list[str] = []
        if self.min is not None:
            extra.append(f"min:{self.min}")
        if self.max is not None:
            extra.append(f"max:{self.max}")
        if len(self.raw_values) > 0:
            extra.append(f"num_raw:{len(self.raw_values)}")
        extra_str = f"<{' '.join(extra)}>" if extra else ""
        return f"avg:{self.avg}{extra_str}"
Attributes¤
avg instance-attribute ¤
avg: float

The derived average value of the metric.

max instance-attribute ¤
max: float | None

The maximum measured value of the metric.

min instance-attribute ¤
min: float | None

The minimum measured value of the metric.

raw_values instance-attribute ¤
raw_values: Sequence[float]

All the raw individual values (it might be empty if not provided by the component).

Functions¤
__str__ ¤
__str__() -> str

Return the short string representation of this instance.

Source code in frequenz/client/microgrid/metrics/_sample.py
def __str__(self) -> str:
    """Return the short string representation of this instance."""
    extra: list[str] = []
    if self.min is not None:
        extra.append(f"min:{self.min}")
    if self.max is not None:
        extra.append(f"max:{self.max}")
    if len(self.raw_values) > 0:
        extra.append(f"num_raw:{len(self.raw_values)}")
    extra_str = f"<{' '.join(extra)}>" if extra else ""
    return f"avg:{self.avg}{extra_str}"

frequenz.client.microgrid.metrics.AggregationMethod ¤

Bases: Enum

The type of the aggregated value.

Source code in frequenz/client/microgrid/metrics/_sample.py
@enum.unique
class AggregationMethod(enum.Enum):
    """The type of the aggregated value."""

    AVG = "avg"
    """The average value of the metric."""

    MIN = "min"
    """The minimum value of the metric."""

    MAX = "max"
    """The maximum value of the metric."""
Attributes¤
AVG class-attribute instance-attribute ¤
AVG = 'avg'

The average value of the metric.

MAX class-attribute instance-attribute ¤
MAX = 'max'

The maximum value of the metric.

MIN class-attribute instance-attribute ¤
MIN = 'min'

The minimum value of the metric.

frequenz.client.microgrid.metrics.Bounds dataclass ¤

A set of lower and upper bounds for any metric.

The lower bound must be less than or equal to the upper bound.

The units of the bounds are always the same as the related metric.

Source code in frequenz/client/microgrid/metrics/_bounds.py
@dataclasses.dataclass(frozen=True, kw_only=True)
class Bounds:
    """A set of lower and upper bounds for any metric.

    The lower bound must be less than or equal to the upper bound.

    The units of the bounds are always the same as the related metric.
    """

    lower: float | None = None
    """The lower bound.

    If `None`, there is no lower bound.
    """

    upper: float | None = None
    """The upper bound.

    If `None`, there is no upper bound.
    """

    def __post_init__(self) -> None:
        """Validate these bounds."""
        if self.lower is None:
            return
        if self.upper is None:
            return
        if self.lower > self.upper:
            raise ValueError(
                f"Lower bound ({self.lower}) must be less than or equal to upper "
                f"bound ({self.upper})"
            )

    def __str__(self) -> str:
        """Return a string representation of these bounds."""
        return f"[{self.lower}, {self.upper}]"
Attributes¤
lower class-attribute instance-attribute ¤
lower: float | None = None

The lower bound.

If None, there is no lower bound.

upper class-attribute instance-attribute ¤
upper: float | None = None

The upper bound.

If None, there is no upper bound.

Functions¤
__post_init__ ¤
__post_init__() -> None

Validate these bounds.

Source code in frequenz/client/microgrid/metrics/_bounds.py
def __post_init__(self) -> None:
    """Validate these bounds."""
    if self.lower is None:
        return
    if self.upper is None:
        return
    if self.lower > self.upper:
        raise ValueError(
            f"Lower bound ({self.lower}) must be less than or equal to upper "
            f"bound ({self.upper})"
        )
__str__ ¤
__str__() -> str

Return a string representation of these bounds.

Source code in frequenz/client/microgrid/metrics/_bounds.py
def __str__(self) -> str:
    """Return a string representation of these bounds."""
    return f"[{self.lower}, {self.upper}]"

frequenz.client.microgrid.metrics.Metric ¤

Bases: Enum

List of supported metrics.

AC energy metrics information
  • This energy metric is reported directly from the component, and not a result of aggregations in our systems. If a component does not have this metric, this field cannot be populated.

  • Components that provide energy metrics reset this metric from time to time. This behaviour is specific to each component model. E.g., some components reset it on UTC 00:00:00.

  • This energy metric does not specify the start time of the accumulation period,and therefore can be inconsistent.

Source code in frequenz/client/microgrid/metrics/_metric.py
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
@enum.unique
class Metric(enum.Enum):
    """List of supported metrics.

    Note: AC energy metrics information
        - This energy metric is reported directly from the component, and not a
          result of aggregations in our systems. If a component does not have this
          metric, this field cannot be populated.

        - Components that provide energy metrics reset this metric from time to
          time. This behaviour is specific to each component model. E.g., some
          components reset it on UTC 00:00:00.

        - This energy metric does not specify the start time of the accumulation
          period,and therefore can be inconsistent.
    """

    UNSPECIFIED = metrics_pb2.METRIC_UNSPECIFIED
    """The metric is unspecified (this should not be used)."""

    DC_VOLTAGE = metrics_pb2.METRIC_DC_VOLTAGE
    """The direct current voltage."""

    DC_CURRENT = metrics_pb2.METRIC_DC_CURRENT
    """The direct current current."""

    DC_POWER = metrics_pb2.METRIC_DC_POWER
    """The direct current power."""

    AC_FREQUENCY = metrics_pb2.METRIC_AC_FREQUENCY
    """The alternating current frequency."""

    AC_VOLTAGE = metrics_pb2.METRIC_AC_VOLTAGE
    """The alternating current electric potential difference."""

    AC_VOLTAGE_PHASE_1_N = metrics_pb2.METRIC_AC_VOLTAGE_PHASE_1_N
    """The alternating current electric potential difference between phase 1 and neutral."""

    AC_VOLTAGE_PHASE_2_N = metrics_pb2.METRIC_AC_VOLTAGE_PHASE_2_N
    """The alternating current electric potential difference between phase 2 and neutral."""

    AC_VOLTAGE_PHASE_3_N = metrics_pb2.METRIC_AC_VOLTAGE_PHASE_3_N
    """The alternating current electric potential difference between phase 3 and neutral."""

    AC_VOLTAGE_PHASE_1_PHASE_2 = metrics_pb2.METRIC_AC_VOLTAGE_PHASE_1_PHASE_2
    """The alternating current electric potential difference between phase 1 and phase 2."""

    AC_VOLTAGE_PHASE_2_PHASE_3 = metrics_pb2.METRIC_AC_VOLTAGE_PHASE_2_PHASE_3
    """The alternating current electric potential difference between phase 2 and phase 3."""

    AC_VOLTAGE_PHASE_3_PHASE_1 = metrics_pb2.METRIC_AC_VOLTAGE_PHASE_3_PHASE_1
    """The alternating current electric potential difference between phase 3 and phase 1."""

    AC_CURRENT = metrics_pb2.METRIC_AC_CURRENT
    """The alternating current current."""

    AC_CURRENT_PHASE_1 = metrics_pb2.METRIC_AC_CURRENT_PHASE_1
    """The alternating current current in phase 1."""

    AC_CURRENT_PHASE_2 = metrics_pb2.METRIC_AC_CURRENT_PHASE_2
    """The alternating current current in phase 2."""

    AC_CURRENT_PHASE_3 = metrics_pb2.METRIC_AC_CURRENT_PHASE_3
    """The alternating current current in phase 3."""

    AC_POWER_APPARENT = metrics_pb2.METRIC_AC_POWER_APPARENT
    """The alternating current apparent power."""

    AC_APPARENT_POWER = enum.deprecated_member(
        metrics_pb2.METRIC_AC_POWER_APPARENT,
        "AC_APPARENT_POWER is deprecated, use AC_POWER_APPARENT instead",
    )
    """The alternating current apparent power (deprecated).

    Deprecated: Deprecated in v0.18.0
        Use [`AC_POWER_APPARENT`][frequenz.client.microgrid.metrics.Metric.AC_POWER_APPARENT]
        instead.
    """

    AC_POWER_APPARENT_PHASE_1 = metrics_pb2.METRIC_AC_POWER_APPARENT_PHASE_1
    """The alternating current apparent power in phase 1."""

    AC_APPARENT_POWER_PHASE_1 = enum.deprecated_member(
        metrics_pb2.METRIC_AC_POWER_APPARENT_PHASE_1,
        "AC_APPARENT_POWER_PHASE_1 is deprecated, use AC_POWER_APPARENT_PHASE_1 instead",
    )
    """The alternating current apparent power in phase 1 (deprecated).

    Deprecated: Deprecated in v0.18.0
        Use [`AC_POWER_APPARENT_PHASE_1`][frequenz.client.microgrid.metrics.Metric.AC_POWER_APPARENT_PHASE_1]
        instead.
    """

    AC_POWER_APPARENT_PHASE_2 = metrics_pb2.METRIC_AC_POWER_APPARENT_PHASE_2
    """The alternating current apparent power in phase 2."""

    AC_APPARENT_POWER_PHASE_2 = enum.deprecated_member(
        metrics_pb2.METRIC_AC_POWER_APPARENT_PHASE_2,
        "AC_APPARENT_POWER_PHASE_2 is deprecated, use AC_POWER_APPARENT_PHASE_2 instead",
    )
    """The alternating current apparent power in phase 2 (deprecated).

    Deprecated: Deprecated in v0.18.0
        Use [`AC_POWER_APPARENT_PHASE_2`][frequenz.client.microgrid.metrics.Metric.AC_POWER_APPARENT_PHASE_2]
        instead.
    """

    AC_POWER_APPARENT_PHASE_3 = metrics_pb2.METRIC_AC_POWER_APPARENT_PHASE_3
    """The alternating current apparent power in phase 3."""

    AC_APPARENT_POWER_PHASE_3 = enum.deprecated_member(
        metrics_pb2.METRIC_AC_POWER_APPARENT_PHASE_3,
        "AC_APPARENT_POWER_PHASE_3 is deprecated, use AC_POWER_APPARENT_PHASE_3 instead",
    )
    """The alternating current apparent power in phase 3 (deprecated).

    Deprecated: Deprecated in v0.18.0
        Use [`AC_POWER_APPARENT_PHASE_3`][frequenz.client.microgrid.metrics.Metric.AC_POWER_APPARENT_PHASE_3]
        instead.
    """

    AC_POWER_ACTIVE = metrics_pb2.METRIC_AC_POWER_ACTIVE
    """The alternating current active power."""

    AC_ACTIVE_POWER = enum.deprecated_member(
        metrics_pb2.METRIC_AC_POWER_ACTIVE,
        "AC_ACTIVE_POWER is deprecated, use AC_POWER_ACTIVE instead",
    )
    """The alternating current active power (deprecated).

    Deprecated: Deprecated in v0.18.0
        Use [`AC_POWER_ACTIVE`][frequenz.client.microgrid.metrics.Metric.AC_POWER_ACTIVE]
        instead.
    """

    AC_POWER_ACTIVE_PHASE_1 = metrics_pb2.METRIC_AC_POWER_ACTIVE_PHASE_1
    """The alternating current active power in phase 1."""

    AC_ACTIVE_POWER_PHASE_1 = enum.deprecated_member(
        metrics_pb2.METRIC_AC_POWER_ACTIVE_PHASE_1,
        "AC_ACTIVE_POWER_PHASE_1 is deprecated, use AC_POWER_ACTIVE_PHASE_1 instead",
    )
    """The alternating current active power in phase 1 (deprecated).

    Deprecated: Deprecated in v0.18.0
        Use [`AC_POWER_ACTIVE_PHASE_1`][frequenz.client.microgrid.metrics.Metric.AC_POWER_ACTIVE_PHASE_1]
        instead.
    """

    AC_POWER_ACTIVE_PHASE_2 = metrics_pb2.METRIC_AC_POWER_ACTIVE_PHASE_2
    """The alternating current active power in phase 2."""

    AC_ACTIVE_POWER_PHASE_2 = enum.deprecated_member(
        metrics_pb2.METRIC_AC_POWER_ACTIVE_PHASE_2,
        "AC_ACTIVE_POWER_PHASE_2 is deprecated, use AC_POWER_ACTIVE_PHASE_2 instead",
    )
    """The alternating current active power in phase 2 (deprecated).

    Deprecated: Deprecated in v0.18.0
        Use [`AC_POWER_ACTIVE_PHASE_2`][frequenz.client.microgrid.metrics.Metric.AC_POWER_ACTIVE_PHASE_2]
        instead.
    """

    AC_POWER_ACTIVE_PHASE_3 = metrics_pb2.METRIC_AC_POWER_ACTIVE_PHASE_3
    """The alternating current active power in phase 3."""

    AC_ACTIVE_POWER_PHASE_3 = enum.deprecated_member(
        metrics_pb2.METRIC_AC_POWER_ACTIVE_PHASE_3,
        "AC_ACTIVE_POWER_PHASE_3 is deprecated, use AC_POWER_ACTIVE_PHASE_3 instead",
    )
    """The alternating current active power in phase 3 (deprecated).

    Deprecated: Deprecated in v0.18.0
        Use [`AC_POWER_ACTIVE_PHASE_3`][frequenz.client.microgrid.metrics.Metric.AC_POWER_ACTIVE_PHASE_3]
        instead.
    """

    AC_POWER_REACTIVE = metrics_pb2.METRIC_AC_POWER_REACTIVE
    """The alternating current reactive power."""

    AC_REACTIVE_POWER = enum.deprecated_member(
        metrics_pb2.METRIC_AC_POWER_REACTIVE,
        "AC_REACTIVE_POWER is deprecated, use AC_POWER_REACTIVE instead",
    )
    """The alternating current reactive power (deprecated).

    Deprecated: Deprecated in v0.18.0
        Use [`AC_POWER_REACTIVE`][frequenz.client.microgrid.metrics.Metric.AC_POWER_REACTIVE]
        instead.
    """

    AC_POWER_REACTIVE_PHASE_1 = metrics_pb2.METRIC_AC_POWER_REACTIVE_PHASE_1
    """The alternating current reactive power in phase 1."""

    AC_REACTIVE_POWER_PHASE_1 = enum.deprecated_member(
        metrics_pb2.METRIC_AC_POWER_REACTIVE_PHASE_1,
        "AC_REACTIVE_POWER_PHASE_1 is deprecated, use AC_POWER_REACTIVE_PHASE_1 instead",
    )
    """The alternating current reactive power in phase 1 (deprecated).

    Deprecated: Deprecated in v0.18.0
        Use [`AC_POWER_REACTIVE_PHASE_1`][frequenz.client.microgrid.metrics.Metric.AC_POWER_REACTIVE_PHASE_1]
        instead.
    """

    AC_POWER_REACTIVE_PHASE_2 = metrics_pb2.METRIC_AC_POWER_REACTIVE_PHASE_2
    """The alternating current reactive power in phase 2."""

    AC_REACTIVE_POWER_PHASE_2 = enum.deprecated_member(
        metrics_pb2.METRIC_AC_POWER_REACTIVE_PHASE_2,
        "AC_REACTIVE_POWER_PHASE_2 is deprecated, use AC_POWER_REACTIVE_PHASE_2 instead",
    )
    """The alternating current reactive power in phase 2 (deprecated).

    Deprecated: Deprecated in v0.18.0
        Use [`AC_POWER_REACTIVE_PHASE_2`][frequenz.client.microgrid.metrics.Metric.AC_POWER_REACTIVE_PHASE_2]
        instead.
    """

    AC_POWER_REACTIVE_PHASE_3 = metrics_pb2.METRIC_AC_POWER_REACTIVE_PHASE_3
    """The alternating current reactive power in phase 3."""

    AC_REACTIVE_POWER_PHASE_3 = enum.deprecated_member(
        metrics_pb2.METRIC_AC_POWER_REACTIVE_PHASE_3,
        "AC_REACTIVE_POWER_PHASE_3 is deprecated, use AC_POWER_REACTIVE_PHASE_3 instead",
    )
    """The alternating current reactive power in phase 3 (deprecated).

    Deprecated: Deprecated in v0.18.0
        Use [`AC_POWER_REACTIVE_PHASE_3`][frequenz.client.microgrid.metrics.Metric.AC_POWER_REACTIVE_PHASE_3]
        instead.
    """

    AC_POWER_FACTOR = metrics_pb2.METRIC_AC_POWER_FACTOR
    """The alternating current power factor."""

    AC_POWER_FACTOR_PHASE_1 = metrics_pb2.METRIC_AC_POWER_FACTOR_PHASE_1
    """The alternating current power factor in phase 1."""

    AC_POWER_FACTOR_PHASE_2 = metrics_pb2.METRIC_AC_POWER_FACTOR_PHASE_2
    """The alternating current power factor in phase 2."""

    AC_POWER_FACTOR_PHASE_3 = metrics_pb2.METRIC_AC_POWER_FACTOR_PHASE_3
    """The alternating current power factor in phase 3."""

    AC_ENERGY_APPARENT = metrics_pb2.METRIC_AC_ENERGY_APPARENT
    """The alternating current apparent energy."""

    AC_APPARENT_ENERGY = enum.deprecated_member(
        metrics_pb2.METRIC_AC_ENERGY_APPARENT,
        "AC_APPARENT_ENERGY is deprecated, use AC_ENERGY_APPARENT instead",
    )
    """The alternating current apparent energy (deprecated).

    Deprecated: Deprecated in v0.18.0
        Use [`AC_ENERGY_APPARENT`][frequenz.client.microgrid.metrics.Metric.AC_ENERGY_APPARENT]
        instead.
    """

    AC_ENERGY_APPARENT_PHASE_1 = metrics_pb2.METRIC_AC_ENERGY_APPARENT_PHASE_1
    """The alternating current apparent energy in phase 1."""

    AC_APPARENT_ENERGY_PHASE_1 = enum.deprecated_member(
        metrics_pb2.METRIC_AC_ENERGY_APPARENT_PHASE_1,
        "AC_APPARENT_ENERGY_PHASE_1 is deprecated, use AC_ENERGY_APPARENT_PHASE_1 instead",
    )
    """The alternating current apparent energy in phase 1 (deprecated).

    Deprecated: Deprecated in v0.18.0
        Use [`AC_ENERGY_APPARENT_PHASE_1`][frequenz.client.microgrid.metrics.Metric.AC_ENERGY_APPARENT_PHASE_1]
        instead.
    """

    AC_ENERGY_APPARENT_PHASE_2 = metrics_pb2.METRIC_AC_ENERGY_APPARENT_PHASE_2
    """The alternating current apparent energy in phase 2."""

    AC_APPARENT_ENERGY_PHASE_2 = enum.deprecated_member(
        metrics_pb2.METRIC_AC_ENERGY_APPARENT_PHASE_2,
        "AC_APPARENT_ENERGY_PHASE_2 is deprecated, use AC_ENERGY_APPARENT_PHASE_2 instead",
    )
    """The alternating current apparent energy in phase 2 (deprecated).

    Deprecated: Deprecated in v0.18.0
        Use [`AC_ENERGY_APPARENT_PHASE_2`][frequenz.client.microgrid.metrics.Metric.AC_ENERGY_APPARENT_PHASE_2]
        instead.
    """

    AC_ENERGY_APPARENT_PHASE_3 = metrics_pb2.METRIC_AC_ENERGY_APPARENT_PHASE_3
    """The alternating current apparent energy in phase 3."""

    AC_APPARENT_ENERGY_PHASE_3 = enum.deprecated_member(
        metrics_pb2.METRIC_AC_ENERGY_APPARENT_PHASE_3,
        "AC_APPARENT_ENERGY_PHASE_3 is deprecated, use AC_ENERGY_APPARENT_PHASE_3 instead",
    )
    """The alternating current apparent energy in phase 3 (deprecated).

    Deprecated: Deprecated in v0.18.0
        Use [`AC_ENERGY_APPARENT_PHASE_3`][frequenz.client.microgrid.metrics.Metric.AC_ENERGY_APPARENT_PHASE_3]
        instead.
    """

    AC_ENERGY_ACTIVE = metrics_pb2.METRIC_AC_ENERGY_ACTIVE
    """The alternating current active energy."""

    AC_ACTIVE_ENERGY = enum.deprecated_member(
        metrics_pb2.METRIC_AC_ENERGY_ACTIVE,
        "AC_ACTIVE_ENERGY is deprecated, use AC_ENERGY_ACTIVE instead",
    )
    """The alternating current active energy (deprecated).

    Deprecated: Deprecated in v0.18.0
        Use [`AC_ENERGY_ACTIVE`][frequenz.client.microgrid.metrics.Metric.AC_ENERGY_ACTIVE]
        instead.
    """

    AC_ENERGY_ACTIVE_PHASE_1 = metrics_pb2.METRIC_AC_ENERGY_ACTIVE_PHASE_1
    """The alternating current active energy in phase 1."""

    AC_ACTIVE_ENERGY_PHASE_1 = enum.deprecated_member(
        metrics_pb2.METRIC_AC_ENERGY_ACTIVE_PHASE_1,
        "AC_ACTIVE_ENERGY_PHASE_1 is deprecated, use AC_ENERGY_ACTIVE_PHASE_1 instead",
    )
    """The alternating current active energy in phase 1 (deprecated).

    Deprecated: Deprecated in v0.18.0
        Use [`AC_ENERGY_ACTIVE_PHASE_1`][frequenz.client.microgrid.metrics.Metric.AC_ENERGY_ACTIVE_PHASE_1]
        instead.
    """

    AC_ENERGY_ACTIVE_PHASE_2 = metrics_pb2.METRIC_AC_ENERGY_ACTIVE_PHASE_2
    """The alternating current active energy in phase 2."""

    AC_ACTIVE_ENERGY_PHASE_2 = enum.deprecated_member(
        metrics_pb2.METRIC_AC_ENERGY_ACTIVE_PHASE_2,
        "AC_ACTIVE_ENERGY_PHASE_2 is deprecated, use AC_ENERGY_ACTIVE_PHASE_2 instead",
    )
    """The alternating current active energy in phase 2 (deprecated).

    Deprecated: Deprecated in v0.18.0
        Use [`AC_ENERGY_ACTIVE_PHASE_2`][frequenz.client.microgrid.metrics.Metric.AC_ENERGY_ACTIVE_PHASE_2]
        instead.
    """

    AC_ENERGY_ACTIVE_PHASE_3 = metrics_pb2.METRIC_AC_ENERGY_ACTIVE_PHASE_3
    """The alternating current active energy in phase 3."""

    AC_ACTIVE_ENERGY_PHASE_3 = enum.deprecated_member(
        metrics_pb2.METRIC_AC_ENERGY_ACTIVE_PHASE_3,
        "AC_ACTIVE_ENERGY_PHASE_3 is deprecated, use AC_ENERGY_ACTIVE_PHASE_3 instead",
    )
    """The alternating current active energy in phase 3 (deprecated).

    Deprecated: Deprecated in v0.18.0
        Use [`AC_ENERGY_ACTIVE_PHASE_3`][frequenz.client.microgrid.metrics.Metric.AC_ENERGY_ACTIVE_PHASE_3]
        instead.
    """

    AC_ENERGY_ACTIVE_CONSUMED = metrics_pb2.METRIC_AC_ENERGY_ACTIVE_CONSUMED
    """The alternating current active energy consumed."""

    AC_ACTIVE_ENERGY_CONSUMED = enum.deprecated_member(
        metrics_pb2.METRIC_AC_ENERGY_ACTIVE_CONSUMED,
        "AC_ACTIVE_ENERGY_CONSUMED is deprecated, use AC_ENERGY_ACTIVE_CONSUMED instead",
    )
    """The alternating current active energy consumed (deprecated).

    Deprecated: Deprecated in v0.18.0
        Use [`AC_ENERGY_ACTIVE_CONSUMED`][frequenz.client.microgrid.metrics.Metric.AC_ENERGY_ACTIVE_CONSUMED]
        instead.
    """

    AC_ENERGY_ACTIVE_CONSUMED_PHASE_1 = (
        metrics_pb2.METRIC_AC_ENERGY_ACTIVE_CONSUMED_PHASE_1
    )
    """The alternating current active energy consumed in phase 1."""

    AC_ACTIVE_ENERGY_CONSUMED_PHASE_1 = enum.deprecated_member(
        metrics_pb2.METRIC_AC_ENERGY_ACTIVE_CONSUMED_PHASE_1,
        "AC_ACTIVE_ENERGY_CONSUMED_PHASE_1 is deprecated, use AC_ENERGY_ACTIVE_CONSUMED_PHASE_1 instead",
    )
    """The alternating current active energy consumed in phase 1 (deprecated).

    Deprecated: Deprecated in v0.18.0
        Use [`AC_ENERGY_ACTIVE_CONSUMED_PHASE_1`][frequenz.client.microgrid.metrics.Metric.AC_ENERGY_ACTIVE_CONSUMED_PHASE_1]
        instead.
    """

    AC_ENERGY_ACTIVE_CONSUMED_PHASE_2 = (
        metrics_pb2.METRIC_AC_ENERGY_ACTIVE_CONSUMED_PHASE_2
    )
    """The alternating current active energy consumed in phase 2."""

    AC_ACTIVE_ENERGY_CONSUMED_PHASE_2 = enum.deprecated_member(
        metrics_pb2.METRIC_AC_ENERGY_ACTIVE_CONSUMED_PHASE_2,
        "AC_ACTIVE_ENERGY_CONSUMED_PHASE_2 is deprecated, use AC_ENERGY_ACTIVE_CONSUMED_PHASE_2 instead",
    )
    """The alternating current active energy consumed in phase 2 (deprecated).

    Deprecated: Deprecated in v0.18.0
        Use [`AC_ENERGY_ACTIVE_CONSUMED_PHASE_2`][frequenz.client.microgrid.metrics.Metric.AC_ENERGY_ACTIVE_CONSUMED_PHASE_2]
        instead.
    """

    AC_ENERGY_ACTIVE_CONSUMED_PHASE_3 = (
        metrics_pb2.METRIC_AC_ENERGY_ACTIVE_CONSUMED_PHASE_3
    )
    """The alternating current active energy consumed in phase 3."""

    AC_ACTIVE_ENERGY_CONSUMED_PHASE_3 = enum.deprecated_member(
        metrics_pb2.METRIC_AC_ENERGY_ACTIVE_CONSUMED_PHASE_3,
        "AC_ACTIVE_ENERGY_CONSUMED_PHASE_3 is deprecated, use AC_ENERGY_ACTIVE_CONSUMED_PHASE_3 instead",
    )
    """The alternating current active energy consumed in phase 3 (deprecated).

    Deprecated: Deprecated in v0.18.0
        Use [`AC_ENERGY_ACTIVE_CONSUMED_PHASE_3`][frequenz.client.microgrid.metrics.Metric.AC_ENERGY_ACTIVE_CONSUMED_PHASE_3]
        instead.
    """

    AC_ENERGY_ACTIVE_DELIVERED = metrics_pb2.METRIC_AC_ENERGY_ACTIVE_DELIVERED
    """The alternating current active energy delivered."""

    AC_ACTIVE_ENERGY_DELIVERED = enum.deprecated_member(
        metrics_pb2.METRIC_AC_ENERGY_ACTIVE_DELIVERED,
        "AC_ACTIVE_ENERGY_DELIVERED is deprecated, use AC_ENERGY_ACTIVE_DELIVERED instead",
    )
    """The alternating current active energy delivered (deprecated).

    Deprecated: Deprecated in v0.18.0
        Use [`AC_ENERGY_ACTIVE_DELIVERED`][frequenz.client.microgrid.metrics.Metric.AC_ENERGY_ACTIVE_DELIVERED]
        instead.
    """

    AC_ENERGY_ACTIVE_DELIVERED_PHASE_1 = (
        metrics_pb2.METRIC_AC_ENERGY_ACTIVE_DELIVERED_PHASE_1
    )
    """The alternating current active energy delivered in phase 1."""

    AC_ACTIVE_ENERGY_DELIVERED_PHASE_1 = enum.deprecated_member(
        metrics_pb2.METRIC_AC_ENERGY_ACTIVE_DELIVERED_PHASE_1,
        "AC_ACTIVE_ENERGY_DELIVERED_PHASE_1 is deprecated, use AC_ENERGY_ACTIVE_DELIVERED_PHASE_1 instead",
    )
    """The alternating current active energy delivered in phase 1 (deprecated).

    Deprecated: Deprecated in v0.18.0
        Use [`AC_ENERGY_ACTIVE_DELIVERED_PHASE_1`][frequenz.client.microgrid.metrics.Metric.AC_ENERGY_ACTIVE_DELIVERED_PHASE_1]
        instead.
    """

    AC_ENERGY_ACTIVE_DELIVERED_PHASE_2 = (
        metrics_pb2.METRIC_AC_ENERGY_ACTIVE_DELIVERED_PHASE_2
    )
    """The alternating current active energy delivered in phase 2."""

    AC_ACTIVE_ENERGY_DELIVERED_PHASE_2 = enum.deprecated_member(
        metrics_pb2.METRIC_AC_ENERGY_ACTIVE_DELIVERED_PHASE_2,
        "AC_ACTIVE_ENERGY_DELIVERED_PHASE_2 is deprecated, use AC_ENERGY_ACTIVE_DELIVERED_PHASE_2 instead",
    )
    """The alternating current active energy delivered in phase 2 (deprecated).

    Deprecated: Deprecated in v0.18.0
        Use [`AC_ENERGY_ACTIVE_DELIVERED_PHASE_2`][frequenz.client.microgrid.metrics.Metric.AC_ENERGY_ACTIVE_DELIVERED_PHASE_2]
        instead.
    """

    AC_ENERGY_ACTIVE_DELIVERED_PHASE_3 = (
        metrics_pb2.METRIC_AC_ENERGY_ACTIVE_DELIVERED_PHASE_3
    )
    """The alternating current active energy delivered in phase 3."""

    AC_ACTIVE_ENERGY_DELIVERED_PHASE_3 = enum.deprecated_member(
        metrics_pb2.METRIC_AC_ENERGY_ACTIVE_DELIVERED_PHASE_3,
        "AC_ACTIVE_ENERGY_DELIVERED_PHASE_3 is deprecated, use AC_ENERGY_ACTIVE_DELIVERED_PHASE_3 instead",
    )
    """The alternating current active energy delivered in phase 3 (deprecated).

    Deprecated: Deprecated in v0.18.0
        Use [`AC_ENERGY_ACTIVE_DELIVERED_PHASE_3`][frequenz.client.microgrid.metrics.Metric.AC_ENERGY_ACTIVE_DELIVERED_PHASE_3]
        instead.
    """

    AC_ENERGY_REACTIVE = metrics_pb2.METRIC_AC_ENERGY_REACTIVE
    """The alternating current reactive energy."""

    AC_REACTIVE_ENERGY = enum.deprecated_member(
        metrics_pb2.METRIC_AC_ENERGY_REACTIVE,
        "AC_REACTIVE_ENERGY is deprecated, use AC_ENERGY_REACTIVE instead",
    )
    """The alternating current reactive energy (deprecated).

    Deprecated: Deprecated in v0.18.0
        Use [`AC_ENERGY_REACTIVE`][frequenz.client.microgrid.metrics.Metric.AC_ENERGY_REACTIVE]
        instead.
    """

    AC_ENERGY_REACTIVE_PHASE_1 = metrics_pb2.METRIC_AC_ENERGY_REACTIVE_PHASE_1
    """The alternating current reactive energy in phase 1."""

    AC_REACTIVE_ENERGY_PHASE_1 = enum.deprecated_member(
        metrics_pb2.METRIC_AC_ENERGY_REACTIVE_PHASE_1,
        "AC_REACTIVE_ENERGY_PHASE_1 is deprecated, use AC_ENERGY_REACTIVE_PHASE_1 instead",
    )
    """The alternating current reactive energy in phase 1 (deprecated).

    Deprecated: Deprecated in v0.18.0
        Use [`AC_ENERGY_REACTIVE_PHASE_1`][frequenz.client.microgrid.metrics.Metric.AC_ENERGY_REACTIVE_PHASE_1]
        instead.
    """

    AC_ENERGY_REACTIVE_PHASE_2 = metrics_pb2.METRIC_AC_ENERGY_REACTIVE_PHASE_2
    """The alternating current reactive energy in phase 2."""

    AC_REACTIVE_ENERGY_PHASE_2 = enum.deprecated_member(
        metrics_pb2.METRIC_AC_ENERGY_REACTIVE_PHASE_2,
        "AC_REACTIVE_ENERGY_PHASE_2 is deprecated, use AC_ENERGY_REACTIVE_PHASE_2 instead",
    )
    """The alternating current reactive energy in phase 2 (deprecated).

    Deprecated: Deprecated in v0.18.0
        Use [`AC_ENERGY_REACTIVE_PHASE_2`][frequenz.client.microgrid.metrics.Metric.AC_ENERGY_REACTIVE_PHASE_2]
        instead.
    """

    AC_ENERGY_REACTIVE_PHASE_3 = metrics_pb2.METRIC_AC_ENERGY_REACTIVE_PHASE_3
    """The alternating current reactive energy in phase 3."""

    AC_REACTIVE_ENERGY_PHASE_3 = enum.deprecated_member(
        metrics_pb2.METRIC_AC_ENERGY_REACTIVE_PHASE_3,
        "AC_REACTIVE_ENERGY_PHASE_3 is deprecated, use AC_ENERGY_REACTIVE_PHASE_3 instead",
    )
    """The alternating current reactive energy in phase 3 (deprecated).

    Deprecated: Deprecated in v0.18.0
        Use [`AC_ENERGY_REACTIVE_PHASE_3`][frequenz.client.microgrid.metrics.Metric.AC_ENERGY_REACTIVE_PHASE_3]
        instead.
    """

    AC_TOTAL_HARMONIC_DISTORTION_CURRENT = (
        metrics_pb2.METRIC_AC_TOTAL_HARMONIC_DISTORTION_CURRENT
    )
    """The alternating current total harmonic distortion current."""

    AC_TOTAL_HARMONIC_DISTORTION_CURRENT_PHASE_1 = (
        metrics_pb2.METRIC_AC_TOTAL_HARMONIC_DISTORTION_CURRENT_PHASE_1
    )
    """The alternating current total harmonic distortion current in phase 1."""

    AC_TOTAL_HARMONIC_DISTORTION_CURRENT_PHASE_2 = (
        metrics_pb2.METRIC_AC_TOTAL_HARMONIC_DISTORTION_CURRENT_PHASE_2
    )
    """The alternating current total harmonic distortion current in phase 2."""

    AC_TOTAL_HARMONIC_DISTORTION_CURRENT_PHASE_3 = (
        metrics_pb2.METRIC_AC_TOTAL_HARMONIC_DISTORTION_CURRENT_PHASE_3
    )
    """The alternating current total harmonic distortion current in phase 3."""

    BATTERY_CAPACITY = metrics_pb2.METRIC_BATTERY_CAPACITY
    """The capacity of the battery."""

    BATTERY_SOC_PCT = metrics_pb2.METRIC_BATTERY_SOC_PCT
    """The state of charge of the battery as a percentage."""

    BATTERY_TEMPERATURE = metrics_pb2.METRIC_BATTERY_TEMPERATURE
    """The temperature of the battery."""

    INVERTER_TEMPERATURE = metrics_pb2.METRIC_INVERTER_TEMPERATURE
    """The temperature of the inverter."""

    INVERTER_TEMPERATURE_CABINET = metrics_pb2.METRIC_INVERTER_TEMPERATURE_CABINET
    """The temperature of the inverter cabinet."""

    INVERTER_TEMPERATURE_HEATSINK = metrics_pb2.METRIC_INVERTER_TEMPERATURE_HEATSINK
    """The temperature of the inverter heatsink."""

    INVERTER_TEMPERATURE_TRANSFORMER = (
        metrics_pb2.METRIC_INVERTER_TEMPERATURE_TRANSFORMER
    )
    """The temperature of the inverter transformer."""

    EV_CHARGER_TEMPERATURE = metrics_pb2.METRIC_EV_CHARGER_TEMPERATURE
    """The temperature of the EV charger."""

    SENSOR_WIND_SPEED = metrics_pb2.METRIC_SENSOR_WIND_SPEED
    """The speed of the wind measured."""

    SENSOR_WIND_DIRECTION = metrics_pb2.METRIC_SENSOR_WIND_DIRECTION
    """The direction of the wind measured."""

    SENSOR_TEMPERATURE = metrics_pb2.METRIC_SENSOR_TEMPERATURE
    """The temperature measured."""

    SENSOR_RELATIVE_HUMIDITY = metrics_pb2.METRIC_SENSOR_RELATIVE_HUMIDITY
    """The relative humidity measured."""

    SENSOR_DEW_POINT = metrics_pb2.METRIC_SENSOR_DEW_POINT
    """The dew point measured."""

    SENSOR_AIR_PRESSURE = metrics_pb2.METRIC_SENSOR_AIR_PRESSURE
    """The air pressure measured."""

    SENSOR_IRRADIANCE = metrics_pb2.METRIC_SENSOR_IRRADIANCE
    """The irradiance measured."""
Attributes¤
AC_ACTIVE_ENERGY class-attribute instance-attribute ¤
AC_ACTIVE_ENERGY = deprecated_member(
    METRIC_AC_ENERGY_ACTIVE,
    "AC_ACTIVE_ENERGY is deprecated, use AC_ENERGY_ACTIVE instead",
)

The alternating current active energy (deprecated).

Deprecated in v0.18.0

Use AC_ENERGY_ACTIVE instead.

AC_ACTIVE_ENERGY_CONSUMED class-attribute instance-attribute ¤
AC_ACTIVE_ENERGY_CONSUMED = deprecated_member(
    METRIC_AC_ENERGY_ACTIVE_CONSUMED,
    "AC_ACTIVE_ENERGY_CONSUMED is deprecated, use AC_ENERGY_ACTIVE_CONSUMED instead",
)

The alternating current active energy consumed (deprecated).

Deprecated in v0.18.0

Use AC_ENERGY_ACTIVE_CONSUMED instead.

AC_ACTIVE_ENERGY_CONSUMED_PHASE_1 class-attribute instance-attribute ¤
AC_ACTIVE_ENERGY_CONSUMED_PHASE_1 = deprecated_member(
    METRIC_AC_ENERGY_ACTIVE_CONSUMED_PHASE_1,
    "AC_ACTIVE_ENERGY_CONSUMED_PHASE_1 is deprecated, use AC_ENERGY_ACTIVE_CONSUMED_PHASE_1 instead",
)

The alternating current active energy consumed in phase 1 (deprecated).

Deprecated in v0.18.0

Use AC_ENERGY_ACTIVE_CONSUMED_PHASE_1 instead.

AC_ACTIVE_ENERGY_CONSUMED_PHASE_2 class-attribute instance-attribute ¤
AC_ACTIVE_ENERGY_CONSUMED_PHASE_2 = deprecated_member(
    METRIC_AC_ENERGY_ACTIVE_CONSUMED_PHASE_2,
    "AC_ACTIVE_ENERGY_CONSUMED_PHASE_2 is deprecated, use AC_ENERGY_ACTIVE_CONSUMED_PHASE_2 instead",
)

The alternating current active energy consumed in phase 2 (deprecated).

Deprecated in v0.18.0

Use AC_ENERGY_ACTIVE_CONSUMED_PHASE_2 instead.

AC_ACTIVE_ENERGY_CONSUMED_PHASE_3 class-attribute instance-attribute ¤
AC_ACTIVE_ENERGY_CONSUMED_PHASE_3 = deprecated_member(
    METRIC_AC_ENERGY_ACTIVE_CONSUMED_PHASE_3,
    "AC_ACTIVE_ENERGY_CONSUMED_PHASE_3 is deprecated, use AC_ENERGY_ACTIVE_CONSUMED_PHASE_3 instead",
)

The alternating current active energy consumed in phase 3 (deprecated).

Deprecated in v0.18.0

Use AC_ENERGY_ACTIVE_CONSUMED_PHASE_3 instead.

AC_ACTIVE_ENERGY_DELIVERED class-attribute instance-attribute ¤
AC_ACTIVE_ENERGY_DELIVERED = deprecated_member(
    METRIC_AC_ENERGY_ACTIVE_DELIVERED,
    "AC_ACTIVE_ENERGY_DELIVERED is deprecated, use AC_ENERGY_ACTIVE_DELIVERED instead",
)

The alternating current active energy delivered (deprecated).

Deprecated in v0.18.0

Use AC_ENERGY_ACTIVE_DELIVERED instead.

AC_ACTIVE_ENERGY_DELIVERED_PHASE_1 class-attribute instance-attribute ¤
AC_ACTIVE_ENERGY_DELIVERED_PHASE_1 = deprecated_member(
    METRIC_AC_ENERGY_ACTIVE_DELIVERED_PHASE_1,
    "AC_ACTIVE_ENERGY_DELIVERED_PHASE_1 is deprecated, use AC_ENERGY_ACTIVE_DELIVERED_PHASE_1 instead",
)

The alternating current active energy delivered in phase 1 (deprecated).

Deprecated in v0.18.0

Use AC_ENERGY_ACTIVE_DELIVERED_PHASE_1 instead.

AC_ACTIVE_ENERGY_DELIVERED_PHASE_2 class-attribute instance-attribute ¤
AC_ACTIVE_ENERGY_DELIVERED_PHASE_2 = deprecated_member(
    METRIC_AC_ENERGY_ACTIVE_DELIVERED_PHASE_2,
    "AC_ACTIVE_ENERGY_DELIVERED_PHASE_2 is deprecated, use AC_ENERGY_ACTIVE_DELIVERED_PHASE_2 instead",
)

The alternating current active energy delivered in phase 2 (deprecated).

Deprecated in v0.18.0

Use AC_ENERGY_ACTIVE_DELIVERED_PHASE_2 instead.

AC_ACTIVE_ENERGY_DELIVERED_PHASE_3 class-attribute instance-attribute ¤
AC_ACTIVE_ENERGY_DELIVERED_PHASE_3 = deprecated_member(
    METRIC_AC_ENERGY_ACTIVE_DELIVERED_PHASE_3,
    "AC_ACTIVE_ENERGY_DELIVERED_PHASE_3 is deprecated, use AC_ENERGY_ACTIVE_DELIVERED_PHASE_3 instead",
)

The alternating current active energy delivered in phase 3 (deprecated).

Deprecated in v0.18.0

Use AC_ENERGY_ACTIVE_DELIVERED_PHASE_3 instead.

AC_ACTIVE_ENERGY_PHASE_1 class-attribute instance-attribute ¤
AC_ACTIVE_ENERGY_PHASE_1 = deprecated_member(
    METRIC_AC_ENERGY_ACTIVE_PHASE_1,
    "AC_ACTIVE_ENERGY_PHASE_1 is deprecated, use AC_ENERGY_ACTIVE_PHASE_1 instead",
)

The alternating current active energy in phase 1 (deprecated).

Deprecated in v0.18.0

Use AC_ENERGY_ACTIVE_PHASE_1 instead.

AC_ACTIVE_ENERGY_PHASE_2 class-attribute instance-attribute ¤
AC_ACTIVE_ENERGY_PHASE_2 = deprecated_member(
    METRIC_AC_ENERGY_ACTIVE_PHASE_2,
    "AC_ACTIVE_ENERGY_PHASE_2 is deprecated, use AC_ENERGY_ACTIVE_PHASE_2 instead",
)

The alternating current active energy in phase 2 (deprecated).

Deprecated in v0.18.0

Use AC_ENERGY_ACTIVE_PHASE_2 instead.

AC_ACTIVE_ENERGY_PHASE_3 class-attribute instance-attribute ¤
AC_ACTIVE_ENERGY_PHASE_3 = deprecated_member(
    METRIC_AC_ENERGY_ACTIVE_PHASE_3,
    "AC_ACTIVE_ENERGY_PHASE_3 is deprecated, use AC_ENERGY_ACTIVE_PHASE_3 instead",
)

The alternating current active energy in phase 3 (deprecated).

Deprecated in v0.18.0

Use AC_ENERGY_ACTIVE_PHASE_3 instead.

AC_ACTIVE_POWER class-attribute instance-attribute ¤
AC_ACTIVE_POWER = deprecated_member(
    METRIC_AC_POWER_ACTIVE,
    "AC_ACTIVE_POWER is deprecated, use AC_POWER_ACTIVE instead",
)

The alternating current active power (deprecated).

Deprecated in v0.18.0

Use AC_POWER_ACTIVE instead.

AC_ACTIVE_POWER_PHASE_1 class-attribute instance-attribute ¤
AC_ACTIVE_POWER_PHASE_1 = deprecated_member(
    METRIC_AC_POWER_ACTIVE_PHASE_1,
    "AC_ACTIVE_POWER_PHASE_1 is deprecated, use AC_POWER_ACTIVE_PHASE_1 instead",
)

The alternating current active power in phase 1 (deprecated).

Deprecated in v0.18.0

Use AC_POWER_ACTIVE_PHASE_1 instead.

AC_ACTIVE_POWER_PHASE_2 class-attribute instance-attribute ¤
AC_ACTIVE_POWER_PHASE_2 = deprecated_member(
    METRIC_AC_POWER_ACTIVE_PHASE_2,
    "AC_ACTIVE_POWER_PHASE_2 is deprecated, use AC_POWER_ACTIVE_PHASE_2 instead",
)

The alternating current active power in phase 2 (deprecated).

Deprecated in v0.18.0

Use AC_POWER_ACTIVE_PHASE_2 instead.

AC_ACTIVE_POWER_PHASE_3 class-attribute instance-attribute ¤
AC_ACTIVE_POWER_PHASE_3 = deprecated_member(
    METRIC_AC_POWER_ACTIVE_PHASE_3,
    "AC_ACTIVE_POWER_PHASE_3 is deprecated, use AC_POWER_ACTIVE_PHASE_3 instead",
)

The alternating current active power in phase 3 (deprecated).

Deprecated in v0.18.0

Use AC_POWER_ACTIVE_PHASE_3 instead.

AC_APPARENT_ENERGY class-attribute instance-attribute ¤
AC_APPARENT_ENERGY = deprecated_member(
    METRIC_AC_ENERGY_APPARENT,
    "AC_APPARENT_ENERGY is deprecated, use AC_ENERGY_APPARENT instead",
)

The alternating current apparent energy (deprecated).

Deprecated in v0.18.0

Use AC_ENERGY_APPARENT instead.

AC_APPARENT_ENERGY_PHASE_1 class-attribute instance-attribute ¤
AC_APPARENT_ENERGY_PHASE_1 = deprecated_member(
    METRIC_AC_ENERGY_APPARENT_PHASE_1,
    "AC_APPARENT_ENERGY_PHASE_1 is deprecated, use AC_ENERGY_APPARENT_PHASE_1 instead",
)

The alternating current apparent energy in phase 1 (deprecated).

Deprecated in v0.18.0

Use AC_ENERGY_APPARENT_PHASE_1 instead.

AC_APPARENT_ENERGY_PHASE_2 class-attribute instance-attribute ¤
AC_APPARENT_ENERGY_PHASE_2 = deprecated_member(
    METRIC_AC_ENERGY_APPARENT_PHASE_2,
    "AC_APPARENT_ENERGY_PHASE_2 is deprecated, use AC_ENERGY_APPARENT_PHASE_2 instead",
)

The alternating current apparent energy in phase 2 (deprecated).

Deprecated in v0.18.0

Use AC_ENERGY_APPARENT_PHASE_2 instead.

AC_APPARENT_ENERGY_PHASE_3 class-attribute instance-attribute ¤
AC_APPARENT_ENERGY_PHASE_3 = deprecated_member(
    METRIC_AC_ENERGY_APPARENT_PHASE_3,
    "AC_APPARENT_ENERGY_PHASE_3 is deprecated, use AC_ENERGY_APPARENT_PHASE_3 instead",
)

The alternating current apparent energy in phase 3 (deprecated).

Deprecated in v0.18.0

Use AC_ENERGY_APPARENT_PHASE_3 instead.

AC_APPARENT_POWER class-attribute instance-attribute ¤
AC_APPARENT_POWER = deprecated_member(
    METRIC_AC_POWER_APPARENT,
    "AC_APPARENT_POWER is deprecated, use AC_POWER_APPARENT instead",
)

The alternating current apparent power (deprecated).

Deprecated in v0.18.0

Use AC_POWER_APPARENT instead.

AC_APPARENT_POWER_PHASE_1 class-attribute instance-attribute ¤
AC_APPARENT_POWER_PHASE_1 = deprecated_member(
    METRIC_AC_POWER_APPARENT_PHASE_1,
    "AC_APPARENT_POWER_PHASE_1 is deprecated, use AC_POWER_APPARENT_PHASE_1 instead",
)

The alternating current apparent power in phase 1 (deprecated).

Deprecated in v0.18.0

Use AC_POWER_APPARENT_PHASE_1 instead.

AC_APPARENT_POWER_PHASE_2 class-attribute instance-attribute ¤
AC_APPARENT_POWER_PHASE_2 = deprecated_member(
    METRIC_AC_POWER_APPARENT_PHASE_2,
    "AC_APPARENT_POWER_PHASE_2 is deprecated, use AC_POWER_APPARENT_PHASE_2 instead",
)

The alternating current apparent power in phase 2 (deprecated).

Deprecated in v0.18.0

Use AC_POWER_APPARENT_PHASE_2 instead.

AC_APPARENT_POWER_PHASE_3 class-attribute instance-attribute ¤
AC_APPARENT_POWER_PHASE_3 = deprecated_member(
    METRIC_AC_POWER_APPARENT_PHASE_3,
    "AC_APPARENT_POWER_PHASE_3 is deprecated, use AC_POWER_APPARENT_PHASE_3 instead",
)

The alternating current apparent power in phase 3 (deprecated).

Deprecated in v0.18.0

Use AC_POWER_APPARENT_PHASE_3 instead.

AC_CURRENT class-attribute instance-attribute ¤
AC_CURRENT = METRIC_AC_CURRENT

The alternating current current.

AC_CURRENT_PHASE_1 class-attribute instance-attribute ¤
AC_CURRENT_PHASE_1 = METRIC_AC_CURRENT_PHASE_1

The alternating current current in phase 1.

AC_CURRENT_PHASE_2 class-attribute instance-attribute ¤
AC_CURRENT_PHASE_2 = METRIC_AC_CURRENT_PHASE_2

The alternating current current in phase 2.

AC_CURRENT_PHASE_3 class-attribute instance-attribute ¤
AC_CURRENT_PHASE_3 = METRIC_AC_CURRENT_PHASE_3

The alternating current current in phase 3.

AC_ENERGY_ACTIVE class-attribute instance-attribute ¤
AC_ENERGY_ACTIVE = METRIC_AC_ENERGY_ACTIVE

The alternating current active energy.

AC_ENERGY_ACTIVE_CONSUMED class-attribute instance-attribute ¤
AC_ENERGY_ACTIVE_CONSUMED = METRIC_AC_ENERGY_ACTIVE_CONSUMED

The alternating current active energy consumed.

AC_ENERGY_ACTIVE_CONSUMED_PHASE_1 class-attribute instance-attribute ¤
AC_ENERGY_ACTIVE_CONSUMED_PHASE_1 = (
    METRIC_AC_ENERGY_ACTIVE_CONSUMED_PHASE_1
)

The alternating current active energy consumed in phase 1.

AC_ENERGY_ACTIVE_CONSUMED_PHASE_2 class-attribute instance-attribute ¤
AC_ENERGY_ACTIVE_CONSUMED_PHASE_2 = (
    METRIC_AC_ENERGY_ACTIVE_CONSUMED_PHASE_2
)

The alternating current active energy consumed in phase 2.

AC_ENERGY_ACTIVE_CONSUMED_PHASE_3 class-attribute instance-attribute ¤
AC_ENERGY_ACTIVE_CONSUMED_PHASE_3 = (
    METRIC_AC_ENERGY_ACTIVE_CONSUMED_PHASE_3
)

The alternating current active energy consumed in phase 3.

AC_ENERGY_ACTIVE_DELIVERED class-attribute instance-attribute ¤
AC_ENERGY_ACTIVE_DELIVERED = (
    METRIC_AC_ENERGY_ACTIVE_DELIVERED
)

The alternating current active energy delivered.

AC_ENERGY_ACTIVE_DELIVERED_PHASE_1 class-attribute instance-attribute ¤
AC_ENERGY_ACTIVE_DELIVERED_PHASE_1 = (
    METRIC_AC_ENERGY_ACTIVE_DELIVERED_PHASE_1
)

The alternating current active energy delivered in phase 1.

AC_ENERGY_ACTIVE_DELIVERED_PHASE_2 class-attribute instance-attribute ¤
AC_ENERGY_ACTIVE_DELIVERED_PHASE_2 = (
    METRIC_AC_ENERGY_ACTIVE_DELIVERED_PHASE_2
)

The alternating current active energy delivered in phase 2.

AC_ENERGY_ACTIVE_DELIVERED_PHASE_3 class-attribute instance-attribute ¤
AC_ENERGY_ACTIVE_DELIVERED_PHASE_3 = (
    METRIC_AC_ENERGY_ACTIVE_DELIVERED_PHASE_3
)

The alternating current active energy delivered in phase 3.

AC_ENERGY_ACTIVE_PHASE_1 class-attribute instance-attribute ¤
AC_ENERGY_ACTIVE_PHASE_1 = METRIC_AC_ENERGY_ACTIVE_PHASE_1

The alternating current active energy in phase 1.

AC_ENERGY_ACTIVE_PHASE_2 class-attribute instance-attribute ¤
AC_ENERGY_ACTIVE_PHASE_2 = METRIC_AC_ENERGY_ACTIVE_PHASE_2

The alternating current active energy in phase 2.

AC_ENERGY_ACTIVE_PHASE_3 class-attribute instance-attribute ¤
AC_ENERGY_ACTIVE_PHASE_3 = METRIC_AC_ENERGY_ACTIVE_PHASE_3

The alternating current active energy in phase 3.

AC_ENERGY_APPARENT class-attribute instance-attribute ¤
AC_ENERGY_APPARENT = METRIC_AC_ENERGY_APPARENT

The alternating current apparent energy.

AC_ENERGY_APPARENT_PHASE_1 class-attribute instance-attribute ¤
AC_ENERGY_APPARENT_PHASE_1 = (
    METRIC_AC_ENERGY_APPARENT_PHASE_1
)

The alternating current apparent energy in phase 1.

AC_ENERGY_APPARENT_PHASE_2 class-attribute instance-attribute ¤
AC_ENERGY_APPARENT_PHASE_2 = (
    METRIC_AC_ENERGY_APPARENT_PHASE_2
)

The alternating current apparent energy in phase 2.

AC_ENERGY_APPARENT_PHASE_3 class-attribute instance-attribute ¤
AC_ENERGY_APPARENT_PHASE_3 = (
    METRIC_AC_ENERGY_APPARENT_PHASE_3
)

The alternating current apparent energy in phase 3.

AC_ENERGY_REACTIVE class-attribute instance-attribute ¤
AC_ENERGY_REACTIVE = METRIC_AC_ENERGY_REACTIVE

The alternating current reactive energy.

AC_ENERGY_REACTIVE_PHASE_1 class-attribute instance-attribute ¤
AC_ENERGY_REACTIVE_PHASE_1 = (
    METRIC_AC_ENERGY_REACTIVE_PHASE_1
)

The alternating current reactive energy in phase 1.

AC_ENERGY_REACTIVE_PHASE_2 class-attribute instance-attribute ¤
AC_ENERGY_REACTIVE_PHASE_2 = (
    METRIC_AC_ENERGY_REACTIVE_PHASE_2
)

The alternating current reactive energy in phase 2.

AC_ENERGY_REACTIVE_PHASE_3 class-attribute instance-attribute ¤
AC_ENERGY_REACTIVE_PHASE_3 = (
    METRIC_AC_ENERGY_REACTIVE_PHASE_3
)

The alternating current reactive energy in phase 3.

AC_FREQUENCY class-attribute instance-attribute ¤
AC_FREQUENCY = METRIC_AC_FREQUENCY

The alternating current frequency.

AC_POWER_ACTIVE class-attribute instance-attribute ¤
AC_POWER_ACTIVE = METRIC_AC_POWER_ACTIVE

The alternating current active power.

AC_POWER_ACTIVE_PHASE_1 class-attribute instance-attribute ¤
AC_POWER_ACTIVE_PHASE_1 = METRIC_AC_POWER_ACTIVE_PHASE_1

The alternating current active power in phase 1.

AC_POWER_ACTIVE_PHASE_2 class-attribute instance-attribute ¤
AC_POWER_ACTIVE_PHASE_2 = METRIC_AC_POWER_ACTIVE_PHASE_2

The alternating current active power in phase 2.

AC_POWER_ACTIVE_PHASE_3 class-attribute instance-attribute ¤
AC_POWER_ACTIVE_PHASE_3 = METRIC_AC_POWER_ACTIVE_PHASE_3

The alternating current active power in phase 3.

AC_POWER_APPARENT class-attribute instance-attribute ¤
AC_POWER_APPARENT = METRIC_AC_POWER_APPARENT

The alternating current apparent power.

AC_POWER_APPARENT_PHASE_1 class-attribute instance-attribute ¤
AC_POWER_APPARENT_PHASE_1 = METRIC_AC_POWER_APPARENT_PHASE_1

The alternating current apparent power in phase 1.

AC_POWER_APPARENT_PHASE_2 class-attribute instance-attribute ¤
AC_POWER_APPARENT_PHASE_2 = METRIC_AC_POWER_APPARENT_PHASE_2

The alternating current apparent power in phase 2.

AC_POWER_APPARENT_PHASE_3 class-attribute instance-attribute ¤
AC_POWER_APPARENT_PHASE_3 = METRIC_AC_POWER_APPARENT_PHASE_3

The alternating current apparent power in phase 3.

AC_POWER_FACTOR class-attribute instance-attribute ¤
AC_POWER_FACTOR = METRIC_AC_POWER_FACTOR

The alternating current power factor.

AC_POWER_FACTOR_PHASE_1 class-attribute instance-attribute ¤
AC_POWER_FACTOR_PHASE_1 = METRIC_AC_POWER_FACTOR_PHASE_1

The alternating current power factor in phase 1.

AC_POWER_FACTOR_PHASE_2 class-attribute instance-attribute ¤
AC_POWER_FACTOR_PHASE_2 = METRIC_AC_POWER_FACTOR_PHASE_2

The alternating current power factor in phase 2.

AC_POWER_FACTOR_PHASE_3 class-attribute instance-attribute ¤
AC_POWER_FACTOR_PHASE_3 = METRIC_AC_POWER_FACTOR_PHASE_3

The alternating current power factor in phase 3.

AC_POWER_REACTIVE class-attribute instance-attribute ¤
AC_POWER_REACTIVE = METRIC_AC_POWER_REACTIVE

The alternating current reactive power.

AC_POWER_REACTIVE_PHASE_1 class-attribute instance-attribute ¤
AC_POWER_REACTIVE_PHASE_1 = METRIC_AC_POWER_REACTIVE_PHASE_1

The alternating current reactive power in phase 1.

AC_POWER_REACTIVE_PHASE_2 class-attribute instance-attribute ¤
AC_POWER_REACTIVE_PHASE_2 = METRIC_AC_POWER_REACTIVE_PHASE_2

The alternating current reactive power in phase 2.

AC_POWER_REACTIVE_PHASE_3 class-attribute instance-attribute ¤
AC_POWER_REACTIVE_PHASE_3 = METRIC_AC_POWER_REACTIVE_PHASE_3

The alternating current reactive power in phase 3.

AC_REACTIVE_ENERGY class-attribute instance-attribute ¤
AC_REACTIVE_ENERGY = deprecated_member(
    METRIC_AC_ENERGY_REACTIVE,
    "AC_REACTIVE_ENERGY is deprecated, use AC_ENERGY_REACTIVE instead",
)

The alternating current reactive energy (deprecated).

Deprecated in v0.18.0

Use AC_ENERGY_REACTIVE instead.

AC_REACTIVE_ENERGY_PHASE_1 class-attribute instance-attribute ¤
AC_REACTIVE_ENERGY_PHASE_1 = deprecated_member(
    METRIC_AC_ENERGY_REACTIVE_PHASE_1,
    "AC_REACTIVE_ENERGY_PHASE_1 is deprecated, use AC_ENERGY_REACTIVE_PHASE_1 instead",
)

The alternating current reactive energy in phase 1 (deprecated).

Deprecated in v0.18.0

Use AC_ENERGY_REACTIVE_PHASE_1 instead.

AC_REACTIVE_ENERGY_PHASE_2 class-attribute instance-attribute ¤
AC_REACTIVE_ENERGY_PHASE_2 = deprecated_member(
    METRIC_AC_ENERGY_REACTIVE_PHASE_2,
    "AC_REACTIVE_ENERGY_PHASE_2 is deprecated, use AC_ENERGY_REACTIVE_PHASE_2 instead",
)

The alternating current reactive energy in phase 2 (deprecated).

Deprecated in v0.18.0

Use AC_ENERGY_REACTIVE_PHASE_2 instead.

AC_REACTIVE_ENERGY_PHASE_3 class-attribute instance-attribute ¤
AC_REACTIVE_ENERGY_PHASE_3 = deprecated_member(
    METRIC_AC_ENERGY_REACTIVE_PHASE_3,
    "AC_REACTIVE_ENERGY_PHASE_3 is deprecated, use AC_ENERGY_REACTIVE_PHASE_3 instead",
)

The alternating current reactive energy in phase 3 (deprecated).

Deprecated in v0.18.0

Use AC_ENERGY_REACTIVE_PHASE_3 instead.

AC_REACTIVE_POWER class-attribute instance-attribute ¤
AC_REACTIVE_POWER = deprecated_member(
    METRIC_AC_POWER_REACTIVE,
    "AC_REACTIVE_POWER is deprecated, use AC_POWER_REACTIVE instead",
)

The alternating current reactive power (deprecated).

Deprecated in v0.18.0

Use AC_POWER_REACTIVE instead.

AC_REACTIVE_POWER_PHASE_1 class-attribute instance-attribute ¤
AC_REACTIVE_POWER_PHASE_1 = deprecated_member(
    METRIC_AC_POWER_REACTIVE_PHASE_1,
    "AC_REACTIVE_POWER_PHASE_1 is deprecated, use AC_POWER_REACTIVE_PHASE_1 instead",
)

The alternating current reactive power in phase 1 (deprecated).

Deprecated in v0.18.0

Use AC_POWER_REACTIVE_PHASE_1 instead.

AC_REACTIVE_POWER_PHASE_2 class-attribute instance-attribute ¤
AC_REACTIVE_POWER_PHASE_2 = deprecated_member(
    METRIC_AC_POWER_REACTIVE_PHASE_2,
    "AC_REACTIVE_POWER_PHASE_2 is deprecated, use AC_POWER_REACTIVE_PHASE_2 instead",
)

The alternating current reactive power in phase 2 (deprecated).

Deprecated in v0.18.0

Use AC_POWER_REACTIVE_PHASE_2 instead.

AC_REACTIVE_POWER_PHASE_3 class-attribute instance-attribute ¤
AC_REACTIVE_POWER_PHASE_3 = deprecated_member(
    METRIC_AC_POWER_REACTIVE_PHASE_3,
    "AC_REACTIVE_POWER_PHASE_3 is deprecated, use AC_POWER_REACTIVE_PHASE_3 instead",
)

The alternating current reactive power in phase 3 (deprecated).

Deprecated in v0.18.0

Use AC_POWER_REACTIVE_PHASE_3 instead.

AC_TOTAL_HARMONIC_DISTORTION_CURRENT class-attribute instance-attribute ¤
AC_TOTAL_HARMONIC_DISTORTION_CURRENT = (
    METRIC_AC_TOTAL_HARMONIC_DISTORTION_CURRENT
)

The alternating current total harmonic distortion current.

AC_TOTAL_HARMONIC_DISTORTION_CURRENT_PHASE_1 class-attribute instance-attribute ¤
AC_TOTAL_HARMONIC_DISTORTION_CURRENT_PHASE_1 = (
    METRIC_AC_TOTAL_HARMONIC_DISTORTION_CURRENT_PHASE_1
)

The alternating current total harmonic distortion current in phase 1.

AC_TOTAL_HARMONIC_DISTORTION_CURRENT_PHASE_2 class-attribute instance-attribute ¤
AC_TOTAL_HARMONIC_DISTORTION_CURRENT_PHASE_2 = (
    METRIC_AC_TOTAL_HARMONIC_DISTORTION_CURRENT_PHASE_2
)

The alternating current total harmonic distortion current in phase 2.

AC_TOTAL_HARMONIC_DISTORTION_CURRENT_PHASE_3 class-attribute instance-attribute ¤
AC_TOTAL_HARMONIC_DISTORTION_CURRENT_PHASE_3 = (
    METRIC_AC_TOTAL_HARMONIC_DISTORTION_CURRENT_PHASE_3
)

The alternating current total harmonic distortion current in phase 3.

AC_VOLTAGE class-attribute instance-attribute ¤
AC_VOLTAGE = METRIC_AC_VOLTAGE

The alternating current electric potential difference.

AC_VOLTAGE_PHASE_1_N class-attribute instance-attribute ¤
AC_VOLTAGE_PHASE_1_N = METRIC_AC_VOLTAGE_PHASE_1_N

The alternating current electric potential difference between phase 1 and neutral.

AC_VOLTAGE_PHASE_1_PHASE_2 class-attribute instance-attribute ¤
AC_VOLTAGE_PHASE_1_PHASE_2 = (
    METRIC_AC_VOLTAGE_PHASE_1_PHASE_2
)

The alternating current electric potential difference between phase 1 and phase 2.

AC_VOLTAGE_PHASE_2_N class-attribute instance-attribute ¤
AC_VOLTAGE_PHASE_2_N = METRIC_AC_VOLTAGE_PHASE_2_N

The alternating current electric potential difference between phase 2 and neutral.

AC_VOLTAGE_PHASE_2_PHASE_3 class-attribute instance-attribute ¤
AC_VOLTAGE_PHASE_2_PHASE_3 = (
    METRIC_AC_VOLTAGE_PHASE_2_PHASE_3
)

The alternating current electric potential difference between phase 2 and phase 3.

AC_VOLTAGE_PHASE_3_N class-attribute instance-attribute ¤
AC_VOLTAGE_PHASE_3_N = METRIC_AC_VOLTAGE_PHASE_3_N

The alternating current electric potential difference between phase 3 and neutral.

AC_VOLTAGE_PHASE_3_PHASE_1 class-attribute instance-attribute ¤
AC_VOLTAGE_PHASE_3_PHASE_1 = (
    METRIC_AC_VOLTAGE_PHASE_3_PHASE_1
)

The alternating current electric potential difference between phase 3 and phase 1.

BATTERY_CAPACITY class-attribute instance-attribute ¤
BATTERY_CAPACITY = METRIC_BATTERY_CAPACITY

The capacity of the battery.

BATTERY_SOC_PCT class-attribute instance-attribute ¤
BATTERY_SOC_PCT = METRIC_BATTERY_SOC_PCT

The state of charge of the battery as a percentage.

BATTERY_TEMPERATURE class-attribute instance-attribute ¤
BATTERY_TEMPERATURE = METRIC_BATTERY_TEMPERATURE

The temperature of the battery.

DC_CURRENT class-attribute instance-attribute ¤
DC_CURRENT = METRIC_DC_CURRENT

The direct current current.

DC_POWER class-attribute instance-attribute ¤
DC_POWER = METRIC_DC_POWER

The direct current power.

DC_VOLTAGE class-attribute instance-attribute ¤
DC_VOLTAGE = METRIC_DC_VOLTAGE

The direct current voltage.

EV_CHARGER_TEMPERATURE class-attribute instance-attribute ¤
EV_CHARGER_TEMPERATURE = METRIC_EV_CHARGER_TEMPERATURE

The temperature of the EV charger.

INVERTER_TEMPERATURE class-attribute instance-attribute ¤
INVERTER_TEMPERATURE = METRIC_INVERTER_TEMPERATURE

The temperature of the inverter.

INVERTER_TEMPERATURE_CABINET class-attribute instance-attribute ¤
INVERTER_TEMPERATURE_CABINET = (
    METRIC_INVERTER_TEMPERATURE_CABINET
)

The temperature of the inverter cabinet.

INVERTER_TEMPERATURE_HEATSINK class-attribute instance-attribute ¤
INVERTER_TEMPERATURE_HEATSINK = (
    METRIC_INVERTER_TEMPERATURE_HEATSINK
)

The temperature of the inverter heatsink.

INVERTER_TEMPERATURE_TRANSFORMER class-attribute instance-attribute ¤
INVERTER_TEMPERATURE_TRANSFORMER = (
    METRIC_INVERTER_TEMPERATURE_TRANSFORMER
)

The temperature of the inverter transformer.

SENSOR_AIR_PRESSURE class-attribute instance-attribute ¤
SENSOR_AIR_PRESSURE = METRIC_SENSOR_AIR_PRESSURE

The air pressure measured.

SENSOR_DEW_POINT class-attribute instance-attribute ¤
SENSOR_DEW_POINT = METRIC_SENSOR_DEW_POINT

The dew point measured.

SENSOR_IRRADIANCE class-attribute instance-attribute ¤
SENSOR_IRRADIANCE = METRIC_SENSOR_IRRADIANCE

The irradiance measured.

SENSOR_RELATIVE_HUMIDITY class-attribute instance-attribute ¤
SENSOR_RELATIVE_HUMIDITY = METRIC_SENSOR_RELATIVE_HUMIDITY

The relative humidity measured.

SENSOR_TEMPERATURE class-attribute instance-attribute ¤
SENSOR_TEMPERATURE = METRIC_SENSOR_TEMPERATURE

The temperature measured.

SENSOR_WIND_DIRECTION class-attribute instance-attribute ¤
SENSOR_WIND_DIRECTION = METRIC_SENSOR_WIND_DIRECTION

The direction of the wind measured.

SENSOR_WIND_SPEED class-attribute instance-attribute ¤
SENSOR_WIND_SPEED = METRIC_SENSOR_WIND_SPEED

The speed of the wind measured.

UNSPECIFIED class-attribute instance-attribute ¤
UNSPECIFIED = METRIC_UNSPECIFIED

The metric is unspecified (this should not be used).

frequenz.client.microgrid.metrics.MetricSample dataclass ¤

A sampled metric.

This represents a single sample of a specific metric, the value of which is either measured at a particular time. The real-time system-defined bounds are optional and may not always be present or set.

Relationship Between Bounds and Metric Samples

Suppose a metric sample for active power has a lower-bound of -10,000 W, and an upper-bound of 10,000 W. For the system to accept a charge command, clients need to request current values within the bounds.

Source code in frequenz/client/microgrid/metrics/_sample.py
@dataclass(frozen=True, kw_only=True)
class MetricSample:
    """A sampled metric.

    This represents a single sample of a specific metric, the value of which is either
    measured at a particular time. The real-time system-defined bounds are optional and
    may not always be present or set.

    Note: Relationship Between Bounds and Metric Samples
        Suppose a metric sample for active power has a lower-bound of -10,000 W, and an
        upper-bound of 10,000 W. For the system to accept a charge command, clients need
        to request current values within the bounds.
    """

    sampled_at: datetime
    """The moment when the metric was sampled."""

    metric: Metric | int
    """The metric that was sampled."""

    # In the protocol this is float | AggregatedMetricValue, but for live data we can't
    # receive the AggregatedMetricValue, so we limit this to float for now.
    value: float | AggregatedMetricValue | None
    """The value of the sampled metric."""

    bounds: list[Bounds]
    """The bounds that apply to the metric sample.

    These bounds adapt in real-time to reflect the operating conditions at the time of
    aggregation or derivation.

    In the case of certain components like batteries, multiple bounds might exist. These
    multiple bounds collectively extend the range of allowable values, effectively
    forming a union of all given bounds. In such cases, the value of the metric must be
    within at least one of the bounds.

    In accordance with the passive sign convention, bounds that limit discharge would
    have negative numbers, while those limiting charge, such as for the State of Power
    (SoP) metric, would be positive. Hence bounds can have positive and negative values
    depending on the metric they represent.

    Example:
        The diagram below illustrates the relationship between the bounds.

        ```
             bound[0].lower                         bound[1].upper
        <-------|============|------------------|============|--------->
                     bound[0].upper      bound[1].lower

        ---- values here are disallowed and will be rejected
        ==== values here are allowed and will be accepted
        ```
    """

    connection: str | None = None
    """The electrical connection within the component from which the metric was sampled.

    This will be present when the same `Metric` can be obtained from multiple
    electrical connections within the component. Knowing the connection can help in
    certain control and monitoring applications.

    In cases where the component has just one connection for a metric, then the
    connection is `None`.

    Example:
        A hybrid inverter can have a DC string for a battery and another DC string for a
        PV array. The connection names could resemble, say, `dc_battery_0` and
        ``dc_pv_0`. A metric like DC voltage can be obtained from both connections. For
        an application to determine the SoC of the battery using the battery voltage,
        which connection the voltage metric was sampled from is important.
    """

    def as_single_value(
        self, *, aggregation_method: AggregationMethod = AggregationMethod.AVG
    ) -> float | None:
        """Return the value of this sample as a single value.

        if [`value`][frequenz.client.microgrid.metrics.MetricSample.value] is a `float`,
        it is returned as is. If `value` is an
        [`AggregatedMetricValue`][frequenz.client.microgrid.metrics.AggregatedMetricValue],
        the value is aggregated using the provided `aggregation_method`.

        Args:
            aggregation_method: The method to use to aggregate the value when `value` is
                a `AggregatedMetricValue`.

        Returns:
            The value of the sample as a single value, or `None` if the value is `None`.
        """
        match self.value:
            case float() | int():
                return self.value
            case AggregatedMetricValue():
                match aggregation_method:
                    case AggregationMethod.AVG:
                        return self.value.avg
                    case AggregationMethod.MIN:
                        return self.value.min
                    case AggregationMethod.MAX:
                        return self.value.max
                    case unexpected:
                        assert_never(unexpected)
            case None:
                return None
            case unexpected:
                assert_never(unexpected)
Attributes¤
bounds instance-attribute ¤
bounds: list[Bounds]

The bounds that apply to the metric sample.

These bounds adapt in real-time to reflect the operating conditions at the time of aggregation or derivation.

In the case of certain components like batteries, multiple bounds might exist. These multiple bounds collectively extend the range of allowable values, effectively forming a union of all given bounds. In such cases, the value of the metric must be within at least one of the bounds.

In accordance with the passive sign convention, bounds that limit discharge would have negative numbers, while those limiting charge, such as for the State of Power (SoP) metric, would be positive. Hence bounds can have positive and negative values depending on the metric they represent.

Example

The diagram below illustrates the relationship between the bounds.

     bound[0].lower                         bound[1].upper
<-------|============|------------------|============|--------->
             bound[0].upper      bound[1].lower

---- values here are disallowed and will be rejected
==== values here are allowed and will be accepted
connection class-attribute instance-attribute ¤
connection: str | None = None

The electrical connection within the component from which the metric was sampled.

This will be present when the same Metric can be obtained from multiple electrical connections within the component. Knowing the connection can help in certain control and monitoring applications.

In cases where the component has just one connection for a metric, then the connection is None.

Example

A hybrid inverter can have a DC string for a battery and another DC string for a PV array. The connection names could resemble, say, dc_battery_0 and `dc_pv_0. A metric like DC voltage can be obtained from both connections. For an application to determine the SoC of the battery using the battery voltage, which connection the voltage metric was sampled from is important.

metric instance-attribute ¤
metric: Metric | int

The metric that was sampled.

sampled_at instance-attribute ¤
sampled_at: datetime

The moment when the metric was sampled.

value instance-attribute ¤
value: float | AggregatedMetricValue | None

The value of the sampled metric.

Functions¤
as_single_value ¤
as_single_value(
    *, aggregation_method: AggregationMethod = AVG
) -> float | None

Return the value of this sample as a single value.

if value is a float, it is returned as is. If value is an AggregatedMetricValue, the value is aggregated using the provided aggregation_method.

PARAMETER DESCRIPTION
aggregation_method

The method to use to aggregate the value when value is a AggregatedMetricValue.

TYPE: AggregationMethod DEFAULT: AVG

RETURNS DESCRIPTION
float | None

The value of the sample as a single value, or None if the value is None.

Source code in frequenz/client/microgrid/metrics/_sample.py
def as_single_value(
    self, *, aggregation_method: AggregationMethod = AggregationMethod.AVG
) -> float | None:
    """Return the value of this sample as a single value.

    if [`value`][frequenz.client.microgrid.metrics.MetricSample.value] is a `float`,
    it is returned as is. If `value` is an
    [`AggregatedMetricValue`][frequenz.client.microgrid.metrics.AggregatedMetricValue],
    the value is aggregated using the provided `aggregation_method`.

    Args:
        aggregation_method: The method to use to aggregate the value when `value` is
            a `AggregatedMetricValue`.

    Returns:
        The value of the sample as a single value, or `None` if the value is `None`.
    """
    match self.value:
        case float() | int():
            return self.value
        case AggregatedMetricValue():
            match aggregation_method:
                case AggregationMethod.AVG:
                    return self.value.avg
                case AggregationMethod.MIN:
                    return self.value.min
                case AggregationMethod.MAX:
                    return self.value.max
                case unexpected:
                    assert_never(unexpected)
        case None:
            return None
        case unexpected:
            assert_never(unexpected)