# ElectricalEnergyMeasurementTrait.CumulativeEnergyMeasured

# ElectricalEnergyMeasurementTrait.CumulativeEnergyMeasured


```
interface ElectricalEnergyMeasurementTrait.CumulativeEnergyMeasured : ClusterStruct
```

<br />

Known direct subclasses [ElectricalEnergyMeasurement.CumulativeEnergyMeasuredEvent](https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalEnergyMeasurement.CumulativeEnergyMeasuredEvent)

|---|---|
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalEnergyMeasurement.CumulativeEnergyMeasuredEvent` |   |

*** ** * ** ***

This event gets generated when the server takes a snapshot of the cumulative energy imported or exported from the server.

## Summary

| ### Public functions |
|---|---|
| `open https://developers.home.google.com/reference/kotlin/com/google/home/StructDescriptor` | `@https://developers.home.google.com/reference/kotlin/com/google/home/annotation/HomeExperimentalGenericApi https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalEnergyMeasurementTrait.CumulativeEnergyMeasured#getDescriptor()()` Returns the descriptor for the struct. |
| `open https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html?` | `@https://developers.home.google.com/reference/kotlin/com/google/home/annotation/HomeExperimentalGenericApi https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalEnergyMeasurementTrait.CumulativeEnergyMeasured#getFieldValueById(kotlin.UInt)(tagId: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html)` Returns the value of the field for the given tag ID. |

| ### Public properties |
|---|---|
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalEnergyMeasurementTrait.EnergyMeasurementStruct?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalEnergyMeasurementTrait.CumulativeEnergyMeasured#energyExported()` The most recent measurement of cumulative energy exported by the server, and the timestamp of when the measurement was recorded. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalEnergyMeasurementTrait.EnergyMeasurementStruct?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalEnergyMeasurementTrait.CumulativeEnergyMeasured#energyImported()` The most recent measurement of cumulative energy imported by the server, and the timestamp of when the measurement was recorded. |

## Public functions

### getDescriptor

```
@HomeExperimentalGenericApi
open fun getDescriptor(): StructDescriptor
```

Returns the descriptor for the struct.

### getFieldValueById

```
@HomeExperimentalGenericApi
open fun getFieldValueById(tagId: UInt): Any?
```

Returns the value of the field for the given tag ID.

## Public properties

### energyExported

```
val energyExported: ElectricalEnergyMeasurementTrait.EnergyMeasurementStruct?
```

The most recent measurement of cumulative energy exported by the server, and the timestamp of when the measurement was recorded.

### energyImported

```
val energyImported: ElectricalEnergyMeasurementTrait.EnergyMeasurementStruct?
```

The most recent measurement of cumulative energy imported by the server, and the timestamp of when the measurement was recorded.