# DeviceEnergyManagementTrait.PowerAdjustStruct

# DeviceEnergyManagementTrait.PowerAdjustStruct


```
class DeviceEnergyManagementTrait.PowerAdjustStruct : ClusterStruct
```

<br />

*** ** * ** ***

The amount and duration of a power adjustment.

## Summary

| ### Nested types |
|---|
| `@https://developers.home.google.com/reference/kotlin/com/google/home/annotation/HomeExperimentalGenericApi enum https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementTrait.PowerAdjustStruct.StructFields : 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 struct's fields. |

| ### Public constructors |
|---|
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementTrait.PowerAdjustStruct#PowerAdjustStruct(kotlin.Long,kotlin.Long,kotlin.UInt,kotlin.UInt)( minPower: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html, maxPower: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html, minDuration: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html, maxDuration: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html )` Creates the PowerAdjustStruct class. |

| ### 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.PowerAdjustStruct#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.PowerAdjustStruct#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/-u-int/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementTrait.PowerAdjustStruct#maxDuration()` The maximum duration, in seconds, that a controller can invoke an ESA adjustment. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementTrait.PowerAdjustStruct#maxPower()` The maximum power, in milliwatts, that the ESA can have its power adjusted to. |
| `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.PowerAdjustStruct#minDuration()` The minimum duration, in seconds, that a controller can invoke an ESA adjustment. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementTrait.PowerAdjustStruct#minPower()` The minimum power, in milliwatts, to which the ESA can have its power adjusted. |

## Public constructors

### PowerAdjustStruct

```
PowerAdjustStruct(
    minPower: Long = 0,
    maxPower: Long = 0,
    minDuration: UInt,
    maxDuration: UInt
)
```

Creates the PowerAdjustStruct class.

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

### maxDuration

```
val maxDuration: UInt
```

The maximum duration, in seconds, that a controller can invoke an ESA adjustment.

### maxPower

```
val maxPower: Long
```

The maximum power, in milliwatts, that the ESA can have its power adjusted to. A negative value indicates that the power flows away from loads, as in charging a battery inverter.

### minDuration

```
val minDuration: UInt
```

The minimum duration, in seconds, that a controller can invoke an ESA adjustment.

### minPower

```
val minPower: Long
```

The minimum power, in milliwatts, to which the ESA can have its power adjusted. A negative value indicates that the power flows away from loads, as in charging a battery inverter.