# DeviceEnergyManagement

# DeviceEnergyManagement


```
@Generated(value = ["GoogleHomePlatformCodegen"])
interface DeviceEnergyManagement : DeviceEnergyManagementTrait.Attributes, MatterTrait, DeviceEnergyManagementCommands
```

<br />

*** ** * ** ***

API for the DeviceEnergyManagement trait. This trait provides an interface for managing the energy consumption of an energy smart appliance (ESA).

## Summary

| ### Nested types |
|---|
| `enum https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagement.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. |
| `enum https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagement.Command : https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-enum/index.html` Descriptor enum for this trait's commands. |
| `class https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagement.PausedEvent : https://developers.home.google.com/reference/kotlin/com/google/home/Event, https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementTrait.Paused` |
| `enum https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagement.PausedEvent.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/DeviceEnergyManagement.PowerAdjustEndEvent : https://developers.home.google.com/reference/kotlin/com/google/home/Event, https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementTrait.PowerAdjustEnd` |
| `enum https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagement.PowerAdjustEndEvent.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/DeviceEnergyManagement.PowerAdjustStartEvent : https://developers.home.google.com/reference/kotlin/com/google/home/Event, https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementTrait.PowerAdjustStart` |
| `enum https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagement.PowerAdjustStartEvent.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/DeviceEnergyManagement.ResumedEvent : https://developers.home.google.com/reference/kotlin/com/google/home/Event, https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementTrait.Resumed` |
| `enum https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagement.ResumedEvent.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/DeviceEnergyManagement#supports(com.google.home.matter.standard.DeviceEnergyManagement.Attribute)(attribute: https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagement.Attribute)` |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagement#supports(com.google.home.matter.standard.DeviceEnergyManagement.Command)(command: https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagement.Command)` |

| ### 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/DeviceEnergyManagement>` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagement#factory()` |

| ### Inherited functions |
|---|
| From [com.google.home.matter.standard.DeviceEnergyManagementCommands](https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementCommands) |---|---| | `suspend https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementCommands#cancelPowerAdjustRequest()()` Allows a client, such as an EMS, to cancel an ongoing power adjustment request. | | `https://developers.home.google.com/reference/kotlin/com/google/home/BatchableCommand<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html>` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementCommands#cancelPowerAdjustRequestBatchable()()` The batchable version of `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementCommands#cancelPowerAdjustRequest()` command. | | `suspend https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementCommands#cancelRequest()()` Allows an EMS to request cancellation of a previous adjustment request made in a `StartTimeAdjustRequest`, `ModifyForecastRequest`, or `RequestConstraintBasedForecast` command. | | `https://developers.home.google.com/reference/kotlin/com/google/home/BatchableCommand<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html>` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementCommands#cancelRequestBatchable()()` The batchable version of `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementCommands#cancelRequest()` command. | | `suspend https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementCommands#modifyForecastRequest(kotlin.UInt,kotlin.collections.List,com.google.home.matter.standard.DeviceEnergyManagementTrait.AdjustmentCauseEnum)( forecastId: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html, slotAdjustments: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html<https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementTrait.SlotAdjustmentStruct>, cause: https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementTrait.AdjustmentCauseEnum )` Allows an EMS to modify a forecast within the limits allowed by the ESA. | | `https://developers.home.google.com/reference/kotlin/com/google/home/BatchableCommand<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html>` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementCommands#modifyForecastRequestBatchable(kotlin.UInt,kotlin.collections.List,com.google.home.matter.standard.DeviceEnergyManagementTrait.AdjustmentCauseEnum)( forecastId: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html, slotAdjustments: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html<https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementTrait.SlotAdjustmentStruct>, cause: https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementTrait.AdjustmentCauseEnum )` The batchable version of `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementCommands#modifyForecastRequest(kotlin.UInt,kotlin.collections.List,com.google.home.matter.standard.DeviceEnergyManagementTrait.AdjustmentCauseEnum)` command. | | `suspend https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementCommands#pauseRequest(kotlin.UInt,com.google.home.matter.standard.DeviceEnergyManagementTrait.AdjustmentCauseEnum)( duration: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html, cause: https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementTrait.AdjustmentCauseEnum )` Allows a client to temporarily pause an operation and reduce the energy demand on the ESA. | | `https://developers.home.google.com/reference/kotlin/com/google/home/BatchableCommand<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html>` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementCommands#pauseRequestBatchable(kotlin.UInt,com.google.home.matter.standard.DeviceEnergyManagementTrait.AdjustmentCauseEnum)( duration: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html, cause: https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementTrait.AdjustmentCauseEnum )` The batchable version of `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementCommands#pauseRequest(kotlin.UInt,com.google.home.matter.standard.DeviceEnergyManagementTrait.AdjustmentCauseEnum)` command. | | `suspend https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementCommands#powerAdjustRequest(kotlin.Long,kotlin.UInt,com.google.home.matter.standard.DeviceEnergyManagementTrait.AdjustmentCauseEnum)( power: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html, duration: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html, cause: https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementTrait.AdjustmentCauseEnum )` Allows a client, such as an EMS, to request an adjustment in the power consumption of an ESA for a specified duration. | | `https://developers.home.google.com/reference/kotlin/com/google/home/BatchableCommand<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html>` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementCommands#powerAdjustRequestBatchable(kotlin.Long,kotlin.UInt,com.google.home.matter.standard.DeviceEnergyManagementTrait.AdjustmentCauseEnum)( power: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html, duration: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html, cause: https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementTrait.AdjustmentCauseEnum )` The batchable version of `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementCommands#powerAdjustRequest(kotlin.Long,kotlin.UInt,com.google.home.matter.standard.DeviceEnergyManagementTrait.AdjustmentCauseEnum)` command. | | `suspend https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementCommands#requestConstraintBasedForecast(kotlin.collections.List,com.google.home.matter.standard.DeviceEnergyManagementTrait.AdjustmentCauseEnum)( constraints: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html<https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementTrait.ConstraintsStruct>, cause: https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementTrait.AdjustmentCauseEnum )` Allows an EMS to request the ESA to recompute its forecast based on power and time constraints. | | `https://developers.home.google.com/reference/kotlin/com/google/home/BatchableCommand<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html>` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementCommands#requestConstraintBasedForecastBatchable(kotlin.collections.List,com.google.home.matter.standard.DeviceEnergyManagementTrait.AdjustmentCauseEnum)( constraints: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html<https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementTrait.ConstraintsStruct>, cause: https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementTrait.AdjustmentCauseEnum )` The batchable version of `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementCommands#requestConstraintBasedForecast(kotlin.collections.List,com.google.home.matter.standard.DeviceEnergyManagementTrait.AdjustmentCauseEnum)` command. | | `suspend https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementCommands#resumeRequest()()` Allows a client to cancel the `PauseRequest` command and enable the resumption of the previous operation. | | `https://developers.home.google.com/reference/kotlin/com/google/home/BatchableCommand<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html>` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementCommands#resumeRequestBatchable()()` The batchable version of `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementCommands#resumeRequest()` command. | | `suspend https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementCommands#startTimeAdjustRequest(kotlin.UInt,com.google.home.matter.standard.DeviceEnergyManagementTrait.AdjustmentCauseEnum)( requestedStartTime: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html, cause: https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementTrait.AdjustmentCauseEnum )` Allows a client to adjust the start time of a forecast sequence that has not yet started operation. | | `https://developers.home.google.com/reference/kotlin/com/google/home/BatchableCommand<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html>` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementCommands#startTimeAdjustRequestBatchable(kotlin.UInt,com.google.home.matter.standard.DeviceEnergyManagementTrait.AdjustmentCauseEnum)( requestedStartTime: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html, cause: https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementTrait.AdjustmentCauseEnum )` The batchable version of `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementCommands#startTimeAdjustRequest(kotlin.UInt,com.google.home.matter.standard.DeviceEnergyManagementTrait.AdjustmentCauseEnum)` command. | |
| From [com.google.home.matter.standard.DeviceEnergyManagementTrait.Attributes](https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementTrait.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/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. | |
| 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.DeviceEnergyManagementTrait.Attributes](https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementTrait.Attributes) |---|---| | `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. | |
| 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: DeviceEnergyManagement.Attribute): Boolean
```

### supports

```
fun supports(command: DeviceEnergyManagement.Command): Boolean
```

## Public properties

### factory

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