# EnergyPreferenceTrait.Attributes


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

<br />

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

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

*** ** * ** ***

Attributes for the EnergyPreference 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/EnergyPreferenceTrait.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/EnergyPreferenceTrait.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.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/EnergyPreferenceTrait.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/EnergyPreferenceTrait.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/EnergyPreferenceTrait.Attributes#clusterRevision()` The revision of the server cluster specification supported by the cluster instance. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-byte/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/EnergyPreferenceTrait.Attributes#currentEnergyBalance()` The current preference of the user for balancing different priorities during device use. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-byte/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/EnergyPreferenceTrait.Attributes#currentLowPowerModeSensitivity()` The current preference of the user for how quickly a device should enter low power mode. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html<https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/EnergyPreferenceTrait.BalanceStruct>?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/EnergyPreferenceTrait.Attributes#energyBalances()` A list of at least two `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/EnergyPreferenceTrait.BalanceStruct`, each representing a step along a linear scale of relative priorities. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html<https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/EnergyPreferenceTrait.EnergyPriorityEnum>?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/EnergyPreferenceTrait.Attributes#energyPriorities()` Two extremes for interpreting the values in the `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/EnergyPreferenceTrait.Attributes#energyBalances()` attribute. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/EnergyPreferenceTrait.Feature` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/EnergyPreferenceTrait.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/EnergyPreferenceTrait.Attributes#generatedCommandList()` A list of server-generated commands (server to client) which are supported by this cluster server instance. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html<https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/EnergyPreferenceTrait.BalanceStruct>?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/EnergyPreferenceTrait.Attributes#lowPowerModeSensitivities()` A list of at least two `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/EnergyPreferenceTrait.BalanceStruct`, each representing a condition or set of conditions for the device to enter low-power mode. |

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

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

### currentEnergyBalance

```
val currentEnergyBalance: UByte?
```

The current preference of the user for balancing different priorities during device use. The value of this attribute is the 0-based index into the `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/EnergyPreferenceTrait.Attributes#energyBalances()` attribute for the currently selected balance.

**Access type:** Write

### currentLowPowerModeSensitivity

```
val currentLowPowerModeSensitivity: UByte?
```

The current preference of the user for how quickly a device should enter low power mode. The value of this attribute is the 0-based index into the `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/EnergyPreferenceTrait.Attributes#lowPowerModeSensitivities()` attribute for the currently selected sensitivity.

**Access type:** Write

### energyBalances

```
val energyBalances: List<EnergyPreferenceTrait.BalanceStruct>?
```

A list of at least two `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/EnergyPreferenceTrait.BalanceStruct`, each representing a step along a linear scale of relative priorities.

**Access type:** Read

### energyPriorities

```
val energyPriorities: List<EnergyPreferenceTrait.EnergyPriorityEnum>?
```

Two extremes for interpreting the values in the `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/EnergyPreferenceTrait.Attributes#energyBalances()` attribute. These two priorities are in opposition to each other, for example `Comfort` versus `Efficiency` or `Speed` versus `WaterConsumption`.

**Access type:** Read

### featureMap

```
val featureMap: EnergyPreferenceTrait.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).

### generatedCommandList

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

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

### lowPowerModeSensitivities

```
val lowPowerModeSensitivities: List<EnergyPreferenceTrait.BalanceStruct>?
```

A list of at least two `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/EnergyPreferenceTrait.BalanceStruct`, each representing a condition or set of conditions for the device to enter low-power mode.

**Access type:** Read