# DeviceEnergyManagementTrait.Attributes

# DeviceEnergyManagementTrait.Attributes


```
@Generated(value = ["GoogleHomePlatformCodegen"])
interface DeviceEnergyManagementTrait.Attributes : ClusterStruct
```

<br />

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

|---|---|
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagement` | API for the DeviceEnergyManagement trait. |

*** ** * ** ***

Attributes for the DeviceEnergyManagement cluster.

## 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/DeviceEnergyManagementTrait.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/DeviceEnergyManagementTrait.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. |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementTrait.Attributes#absMaxPower()` The maximum electrical power, in milliwatts, that the ESA can consume when it's on. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementTrait.Attributes#absMinPower()` The minimum electrical power, in milliwatts, that the ESA can consume when it's on. |
| `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/DeviceEnergyManagementTrait.Attributes#acceptedCommandList()` A list of client-generated commands which are supported by this cluster server instance. |
| `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/DeviceEnergyManagementTrait.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/DeviceEnergyManagementTrait.Attributes#clusterRevision()` The revision of the server cluster specification supported by the cluster instance. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementTrait.Attributes#esaCanGenerate()` Indicates whether the ESA is classified as a generator or a load. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementTrait.EsaStateEnum?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementTrait.Attributes#esaState()` The current state of the ESA. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementTrait.EsaTypeEnum?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementTrait.Attributes#esaType()` The type of the ESA, which enables an EMS to determine how the ESA consumes, generates, and stores the energy. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementTrait.Feature` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementTrait.Attributes#featureMap()` Whether the server supports zero or more optional cluster features. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementTrait.ForecastStruct?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementTrait.Attributes#forecast()` Allows an ESA to share its intended forecast with a client, such as an EMS. |
| `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/DeviceEnergyManagementTrait.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/DeviceEnergyManagementTrait.OptOutStateEnum?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementTrait.Attributes#optOutState()` Indicates whether the ESA has opted out of energy management. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementTrait.PowerAdjustCapabilityStruct?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementTrait.Attributes#powerAdjustmentCapability()` Indicates how the ESA can be adjusted at the current time. |

## 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

### absMaxPower

```
val absMaxPower: Long?
```

The maximum electrical power, in milliwatts, that the ESA can consume when it's on. The following condition must be true: `AbsMaxPower` is greater than or equal to `AbsMinPower`. For a generator ESA that can discharge a battery to loads in the home, the `AbsMaxPower` is a positive number that represents the maximum power at which the ESA can discharge its internal battery. For example, for a battery storage inverter that can discharge the battery at a maximum power of 3000000mW, the `AbsMaxPower` is 3000000.

**Access type:** Read

### absMinPower

```
val absMinPower: Long?
```

The minimum electrical power, in milliwatts, that the ESA can consume when it's on. This does not include when the ESA is in power save or standby mode. For a generator ESA that can charge an internal battery, the `AbsMinPower` is a negative number that represents the maximum power to which the ESA can charge its internal battery. For example, for a battery storage inverter that can charge its battery at a maximum power of 2000000mW, the `AbsMinPower` is -2000000.

**Access type:** Read

### acceptedCommandList

```
val acceptedCommandList: List<UInt>
```

A list of client-generated commands which are supported by this cluster server instance.

### attributeList

```
val attributeList: List<UInt>
```

A list of the attribute IDs of the attributes supported by the cluster instance.

### clusterRevision

```
val clusterRevision: UShort
```

The revision of the server cluster specification supported by the cluster instance.

### esaCanGenerate

```
val esaCanGenerate: Boolean?
```

Indicates whether the ESA is classified as a generator or a load. This allows an energy management system (EMS) to determine whether any power values reported by the ESA need to have their signs (for positive or negative values) inverted to make proper forecasts and adjustments. For example, a home battery storage system that charges its battery and then discharges to the home loads is classified as a generator, and the value of the `ESACanGenerate` attribute is `true`. The ESA power value is a positive numerical value when indicating that it is discharging to the loads in the home, and a negative numerical value when indicating it is charging its internal battery.

**Access type:** Read

### esaState

```
val esaState: DeviceEnergyManagementTrait.EsaStateEnum?
```

The current state of the ESA. If the ESA is in the `Offline` or `Fault` state, it cannot be controlled by an EMS and may not be able to report its forecast information.

**Access type:** Read

### esaType

```
val esaType: DeviceEnergyManagementTrait.EsaTypeEnum?
```

The type of the ESA, which enables an EMS to determine how the ESA consumes, generates, and stores the energy.

**Access type:** Read

### featureMap

```
val featureMap: DeviceEnergyManagementTrait.Feature
```

Whether the server supports zero or more optional cluster features. A cluster feature is a set of cluster elements that are mandatory or optional for a defined feature of the cluster. If a cluster feature is supported by the cluster instance, then the corresponding bit is set to 1, otherwise the bit is set to 0 (zero).

### forecast

```
val forecast: DeviceEnergyManagementTrait.ForecastStruct?
```

Allows an ESA to share its intended forecast with a client, such as an EMS. A null value indicates that there is no forecast currently available.

**Access type:** Read

### generatedCommandList

```
val generatedCommandList: List<UInt>
```

A list of server-generated commands (server to client) which are supported by this cluster server instance.

### optOutState

```
val optOutState: DeviceEnergyManagementTrait.OptOutStateEnum?
```

Indicates whether the ESA has opted out of energy management. If the ESA has opted out, it will not be controlled by an EMS. The ESA can opt out of energy management by setting this attribute to `true`.

**Access type:** Read

### powerAdjustmentCapability

```
val powerAdjustmentCapability: DeviceEnergyManagementTrait.PowerAdjustCapabilityStruct?
```

Indicates how the ESA can be adjusted at the current time. For example, a battery storage inverter may need to regulate its internal temperature or the charging rate of the battery may be limited due to cold temperatures. An empty list indicates that no power adjustment is currently available, and multiple entries indicate that various permutations of scenarios may be possible. Refer also to `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementTrait.PowerAdjustStruct` for available charging and discharging power adjustments.

**Access type:** Read