# ElectricalEnergyMeasurement

# ElectricalEnergyMeasurement


```
@Generated(value = ["GoogleHomePlatformCodegen"])
interface ElectricalEnergyMeasurement : ElectricalEnergyMeasurementTrait.Attributes, MatterTrait
```

<br />

*** ** * ** ***

API for the ElectricalEnergyMeasurement trait. This trait provides a mechanism for querying data about electrical energy imported or provided by the server.

## Summary

| ### Nested types |
|---|
| `enum https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalEnergyMeasurement.Attribute : https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-enum/index.html, https://developers.home.google.com/reference/kotlin/com/google/home/Field` Descriptor enum for this trait's attributes. |
| `class https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalEnergyMeasurement.CumulativeEnergyMeasuredEvent : https://developers.home.google.com/reference/kotlin/com/google/home/Event, https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalEnergyMeasurementTrait.CumulativeEnergyMeasured` |
| `enum https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalEnergyMeasurement.CumulativeEnergyMeasuredEvent.EventFields : https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-enum/index.html, https://developers.home.google.com/reference/kotlin/com/google/home/Field` Descriptor enum for this event's fields. |
| `class https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalEnergyMeasurement.PeriodicEnergyMeasuredEvent : https://developers.home.google.com/reference/kotlin/com/google/home/Event, https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalEnergyMeasurementTrait.PeriodicEnergyMeasured` |
| `enum https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalEnergyMeasurement.PeriodicEnergyMeasuredEvent.EventFields : https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-enum/index.html, https://developers.home.google.com/reference/kotlin/com/google/home/Field` Descriptor enum for this event's fields. |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalEnergyMeasurement#supports(com.google.home.matter.standard.ElectricalEnergyMeasurement.Attribute)(attribute: https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalEnergyMeasurement.Attribute)` |

| ### Public properties |
|---|---|
| `open https://developers.home.google.com/reference/kotlin/com/google/home/TraitFactory<https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalEnergyMeasurement>` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalEnergyMeasurement#factory()` |

| ### Inherited functions |
|---|
| From [com.google.home.matter.standard.ElectricalEnergyMeasurementTrait.Attributes](https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalEnergyMeasurementTrait.Attributes) |---|---| | `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.Attributes#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.Attributes#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. | |
| From [com.google.home.TraitStateInvalidation](https://developers.home.google.com/reference/kotlin/com/google/home/TraitStateInvalidation) |---|---| | `suspend https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/TraitStateInvalidation#forceRead()()` | |

| ### Inherited properties |
|---|
| From [com.google.home.matter.standard.ElectricalEnergyMeasurementTrait.Attributes](https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalEnergyMeasurementTrait.Attributes) |---|---| | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html>` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalEnergyMeasurementTrait.Attributes#acceptedCommandList()` A list of client-generated commands which are supported by this cluster server instance. | | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalEnergyMeasurementTrait.MeasurementAccuracyStruct?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalEnergyMeasurementTrait.Attributes#accuracy()` The accuracy of energy measurement by this server. | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html>` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalEnergyMeasurementTrait.Attributes#attributeList()` A list of the attribute IDs of the attributes supported by the cluster instance. | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-short/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalEnergyMeasurementTrait.Attributes#clusterRevision()` The revision of the server cluster specification supported by the cluster instance. | | `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.Attributes#cumulativeEnergyExported()` The most recent measurement of cumulative energy exported by the server over the lifetime of the device, 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.Attributes#cumulativeEnergyImported()` The most recent measurement of cumulative energy imported by the server over the lifetime of the device, and the timestamp of when the measurement was recorded. | | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalEnergyMeasurementTrait.CumulativeEnergyResetStruct?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalEnergyMeasurementTrait.Attributes#cumulativeEnergyReset()` Indicates when cumulative measurements were most recently zero. | | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalEnergyMeasurementTrait.Feature` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalEnergyMeasurementTrait.Attributes#featureMap()` Whether the server supports zero or more optional cluster features. | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html>` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalEnergyMeasurementTrait.Attributes#generatedCommandList()` A list of server-generated commands (server to client) which are supported by this cluster server instance. | | `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.Attributes#periodicEnergyExported()` The most recent measurement of periodic energy exported by the server and the period during which it was measured. | | `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.Attributes#periodicEnergyImported()` The most recent measurement of periodic energy imported by the server and the period during which it was measured. | |
| From [com.google.home.Trait](https://developers.home.google.com/reference/kotlin/com/google/home/Trait) |---|---| | `https://developers.home.google.com/reference/kotlin/com/google/home/Trait.TraitMetadata` | `https://developers.home.google.com/reference/kotlin/com/google/home/Trait#metadata()` | |

## Public functions

### supports

```
fun supports(attribute: ElectricalEnergyMeasurement.Attribute): Boolean
```

## Public properties

### factory

```
open val factory: TraitFactory<ElectricalEnergyMeasurement>
```