    struct DeviceEnergyManagementTrait

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


  ### [supportedEventTypes](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait#/s:15GoogleHomeTypes6MatterO27DeviceEnergyManagementTraitV014supportedEventC0Say0aB3SDK0J0_pXpGvpZ)


  ` List of the event types that are supported by `DeviceEnergyManagementTrait`.

  #### Declaration

  Swift

      static let supportedEventTypes: [any Event.Type]

- `


  ### [supportedCommandTypes](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait#/s:15GoogleHomeTypes6MatterO27DeviceEnergyManagementTraitV016supportedCommandC0Say0aB3SDK0J0_pXpGvpZ)


  ` List of the commands that are supported by `DeviceEnergyManagementTrait`.

  #### Declaration

  Swift

      static let supportedCommandTypes: [any Command.Type]

- `


  ### [identifier](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait#/s:15GoogleHomeTypes6MatterO27DeviceEnergyManagementTraitV10identifierSSvpZ)


  ` The trait identifier.

  #### Declaration

  Swift

      static let identifier: String

- `


  ### [metadata](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait#/s:15GoogleHomeTypes6MatterO27DeviceEnergyManagementTraitV8metadata0aB3SDK0H8MetadataVvp)


  ` Metadata about this `Trait`.

  #### Declaration

  Swift

      let metadata: TraitMetadata

- `


  ### [attributes](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait#/s:15GoogleHomeTypes6MatterO27DeviceEnergyManagementTraitV10attributesAE10AttributesVvp)


  ` List of attributes for the `DeviceEnergyManagementTrait`.

  #### Declaration

  Swift

      let attributes: https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.DeviceEnergyManagementTrait.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait/Attributes.html

- `


  ### [init(decoder:interactionProxy:metadata:)](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait#/s:15GoogleHomeTypes6MatterO27DeviceEnergyManagementTraitV7decoder16interactionProxy8metadataAE0aB3SDK0H7DecoderV_AI011InteractionK0_pSgAI0H8MetadataVtKcfc)


  ` Creates a new Trait instance using data read from the given `TraitDecoder`.
  Throws
  `HomeError.parseError` when parsing fails.

  #### Declaration

  Swift

      init(decoder: TraitDecoder, interactionProxy: (any InteractionProxy)?, metadata: TraitMetadata) throws

  #### Parameters

  |---|---|
  | ` decoder ` | The raw data representing this Trait. |
  | ` interactionProxy ` | Proxy to the Interaction Client. |
  | ` metadata ` | Metadata about this Trait. |

- `


  ### [encode(with:)](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait#/s:15GoogleHomeTypes6MatterO27DeviceEnergyManagementTraitV6encode4withy0aB3SDK0H7EncoderC_tKF)


  ` Writes this object to the given `TraitEncoder`.
  Throws `HomeError.encodingFailed` if the data could not be encoded.

  #### Declaration

  Swift

      func encode(with encoder: TraitEncoder) throws

- `


  ### [forceRead()](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait#/s:15GoogleHomeTypes6MatterO27DeviceEnergyManagementTraitV9forceReadyyYaKF)


  ` This API provides the ability to invalidate state retrieved through subscriptions to the
  target device in the cases where state is not being reported correctly, either intentionally
  (e.g attributes in Matter traits with the "C" quality) or unintentionally due to poor
  implementations.

  When successful, this API will result in a forced read of the convening scope as specified by
  the sub-class and return the result through existing Trait subscriptions if present and
  active.

  This API is to be used sparingly as it can impact the performance and battery life of the
  target device. As such, this API may be throttled by the platform.
  Callers SHALL be prepared to deal with `HomeError`s thrown by this call.

  #### Declaration

  Swift

      func forceRead() async throws

- `


  ### [Attributes](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait/Attributes.html)


  ` Attributes for the `https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait.html`.

  #### Declaration

  Swift

      struct Attributes

- `


  ### [==(_:_:)](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait#/s:15GoogleHomeTypes6MatterO27DeviceEnergyManagementTraitV2eeoiySbAE_AEtFZ)


  ` Returns a Boolean value indicating whether two values are equal.

  Equality is the inverse of inequality. For any values `a` and `b`,
  `a == b` implies that `a != b` is `false`.

  #### Declaration

  Swift

      static func == (lhs: https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.DeviceEnergyManagementTrait, rhs: https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.DeviceEnergyManagementTrait) -> Bool

  #### Parameters

  |---|---|
  | ` lhs ` | A value to compare. |
  | ` rhs ` | Another value to compare. |

- `


  ### [hash(into:)](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait#/s:15GoogleHomeTypes6MatterO27DeviceEnergyManagementTraitV4hash4intoys6HasherVz_tF)


  ` Hashes the essential components of this value by feeding them into the
  given hasher.

  Implement this method to conform to the `Hashable` protocol. The
  components used for hashing must be the same as the components compared
  in your type's `==` operator implementation. Call `hasher.combine(_:)`
  with each of these components.
  Important

  In your implementation of `hash(into:)`,
  don't call `finalize()` on the `hasher` instance provided,
  or replace it with a different instance.
  Doing so may become a compile-time error in the future.

  #### Declaration

  Swift

      func hash(into hasher: inout Hasher)

- `


  ### [ConstraintsStruct](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait/ConstraintsStruct.html)


  ` Allows a client such as an EMS to inform an ESA about a constraint period.

  #### Declaration

  Swift

      struct ConstraintsStruct

- `


  ### [CostStruct](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait/CostStruct.html)


  ` Indicates a generic mechanism for expressing the cost to run an appliance.

  #### Declaration

  Swift

      struct CostStruct

- `


  ### [ForecastStruct](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait/ForecastStruct.html)


  ` Indicates a list of `slots` to describe the overall timing of the ESA's planned energy and
  power usage, with different power and energy demands for each slot. For example, slots might
  be used to describe the distinct stages of a washing machine cycle.

  #### Declaration

  Swift

      struct ForecastStruct

- `


  ### [PowerAdjustCapabilityStruct](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait/PowerAdjustCapabilityStruct.html)


  ` Represents the power adjustment capability of the ESA.

  #### Declaration

  Swift

      struct PowerAdjustCapabilityStruct

- `


  ### [PowerAdjustStruct](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait/PowerAdjustStruct.html)


  ` The amount and duration of a power adjustment.

  #### Declaration

  Swift

      struct PowerAdjustStruct

- `


  ### [SlotAdjustmentStruct](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait/SlotAdjustmentStruct.html)


  ` Indicates requested power and duration adjustments for a specific slot.

  #### Declaration

  Swift

      struct SlotAdjustmentStruct

- `


  ### [SlotStruct](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait/SlotStruct.html)


  ` Indicates a specific stage of an ESA's operation.

  #### Declaration

  Swift

      struct SlotStruct

- `


  ### [PowerAdjustStartEvent](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait/PowerAdjustStartEvent.html)


  ` Indicates that the ESA has started the power adjustment session.

  #### Declaration

  Swift

      struct PowerAdjustStartEvent

- `


  ### [PowerAdjustEndEvent](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait/PowerAdjustEndEvent.html)


  ` Indicates that the ESA has ended the power adjustment session.

  #### Declaration

  Swift

      struct PowerAdjustEndEvent

- `


  ### [PausedEvent](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait/PausedEvent.html)


  ` Indicates that the ESA has paused its operation.

  #### Declaration

  Swift

      struct PausedEvent

- `


  ### [ResumedEvent](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait/ResumedEvent.html)


  ` Indicates that the ESA has resumed its operation.

  #### Declaration

  Swift

      struct ResumedEvent

- `


  ### [supportsPowerAdjustRequestCommand](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait#/s:15GoogleHomeTypes6MatterO27DeviceEnergyManagementTraitV33supportsPowerAdjustRequestCommandSbvp)


  ` Whether the device supports the `powerAdjustRequest` command for this trait.

  #### Declaration

  Swift

      var supportsPowerAdjustRequestCommand: Bool { get }

- `


  ### [powerAdjustRequest(power:duration:cause:)](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait#/s:15GoogleHomeTypes6MatterO27DeviceEnergyManagementTraitV18powerAdjustRequest0I08duration5causeys5Int64V_s6UInt32VAE19AdjustmentCauseEnumOtYaKF)


  ` Allows a client, such as an EMS, to request an adjustment in the power consumption of an ESA
  for a specified duration.

  #### Declaration

  Swift

      func powerAdjustRequest(power: Int64, duration: UInt32, cause: https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.DeviceEnergyManagementTrait.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait/AdjustmentCauseEnum.html) async throws

  #### Parameters

  |---|---|
  | ` power ` | The power, in milliwatts, that the ESA can use during the adjustment period. This value must be within the range of `MinPower` and `MaxPower` in the `https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait/PowerAdjustStruct.html`. |
  | ` duration ` | The duration, in seconds, for which the ESA can adjust its power consumption. This value must be within the range of `MinDuration` and `MaxDuration` in the `https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait/PowerAdjustStruct.html`. |
  | ` cause ` | The cause of the request from the EMS. |

- `


  ### [powerAdjustRequestBatchable(power:duration:cause:)](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait#/s:15GoogleHomeTypes6MatterO27DeviceEnergyManagementTraitV27powerAdjustRequestBatchable0I08duration5cause0aB3SDK0L7CommandVyytGs5Int64V_s6UInt32VAE19AdjustmentCauseEnumOtKF)


  ` The batchable version of powerAdjustRequest command above.
  See also
  powerAdjustRequest

  #### Declaration

  Swift

      func powerAdjustRequestBatchable(power: Int64, duration: UInt32, cause: https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.DeviceEnergyManagementTrait.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait/AdjustmentCauseEnum.html) throws -> BatchableCommand<Void>

- `


  ### [supportsCancelPowerAdjustRequestCommand](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait#/s:15GoogleHomeTypes6MatterO27DeviceEnergyManagementTraitV39supportsCancelPowerAdjustRequestCommandSbvp)


  ` Whether the device supports the `cancelPowerAdjustRequest` command for this trait.

  #### Declaration

  Swift

      var supportsCancelPowerAdjustRequestCommand: Bool { get }

- `


  ### [cancelPowerAdjustRequest()](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait#/s:15GoogleHomeTypes6MatterO27DeviceEnergyManagementTraitV24cancelPowerAdjustRequestyyYaKF)


  ` Allows a client, such as an EMS, to cancel an ongoing power adjustment request. The ESA should
  return to its normal power consumption state after the request is canceled.

  #### Declaration

  Swift

      func cancelPowerAdjustRequest() async throws

- `


  ### [cancelPowerAdjustRequestBatchable()](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait#/s:15GoogleHomeTypes6MatterO27DeviceEnergyManagementTraitV33cancelPowerAdjustRequestBatchable0aB3SDK0M7CommandVyytGyKF)


  ` The batchable version of cancelPowerAdjustRequest command above.
  See also
  cancelPowerAdjustRequest

  #### Declaration

  Swift

      func cancelPowerAdjustRequestBatchable() throws -> BatchableCommand<Void>

- `


  ### [supportsStartTimeAdjustRequestCommand](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait#/s:15GoogleHomeTypes6MatterO27DeviceEnergyManagementTraitV37supportsStartTimeAdjustRequestCommandSbvp)


  ` Whether the device supports the `startTimeAdjustRequest` command for this trait.

  #### Declaration

  Swift

      var supportsStartTimeAdjustRequestCommand: Bool { get }

- `


  ### [startTimeAdjustRequest(requestedStartTime:cause:)](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait#/s:15GoogleHomeTypes6MatterO27DeviceEnergyManagementTraitV22startTimeAdjustRequest014requestedStartJ05causeys6UInt32V_AE19AdjustmentCauseEnumOtYaKF)


  ` Allows a client to adjust the start time of a forecast sequence that has not yet started
  operation.

  #### Declaration

  Swift

      func startTimeAdjustRequest(requestedStartTime: UInt32, cause: https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.DeviceEnergyManagementTrait.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait/AdjustmentCauseEnum.html) async throws

  #### Parameters

  |---|---|
  | ` requestedStartTime ` | The start time, in UTC, that the EMS requests the ESA to change its forecast sequence to. This value must be in the future. |
  | ` cause ` | The cause of the request from the EMS. |

- `


  ### [startTimeAdjustRequestBatchable(requestedStartTime:cause:)](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait#/s:15GoogleHomeTypes6MatterO27DeviceEnergyManagementTraitV31startTimeAdjustRequestBatchable014requestedStartJ05cause0aB3SDK0M7CommandVyytGs6UInt32V_AE19AdjustmentCauseEnumOtKF)


  ` The batchable version of startTimeAdjustRequest command above.
  See also
  startTimeAdjustRequest

  #### Declaration

  Swift

      func startTimeAdjustRequestBatchable(requestedStartTime: UInt32, cause: https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.DeviceEnergyManagementTrait.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait/AdjustmentCauseEnum.html) throws -> BatchableCommand<Void>

- `


  ### [supportsPauseRequestCommand](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait#/s:15GoogleHomeTypes6MatterO27DeviceEnergyManagementTraitV27supportsPauseRequestCommandSbvp)


  ` Whether the device supports the `pauseRequest` command for this trait.

  #### Declaration

  Swift

      var supportsPauseRequestCommand: Bool { get }

- `


  ### [pauseRequest(duration:cause:)](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait#/s:15GoogleHomeTypes6MatterO27DeviceEnergyManagementTraitV12pauseRequest8duration5causeys6UInt32V_AE19AdjustmentCauseEnumOtYaKF)


  ` Allows a client to temporarily pause an operation and reduce the energy demand on the ESA.

  #### Declaration

  Swift

      func pauseRequest(duration: UInt32, cause: https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.DeviceEnergyManagementTrait.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait/AdjustmentCauseEnum.html) async throws

  #### Parameters

  |---|---|
  | ` duration ` | The duration, in seconds, for which the ESA should pause its operation. |
  | ` cause ` | The cause of the request from the EMS. |

- `


  ### [pauseRequestBatchable(duration:cause:)](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait#/s:15GoogleHomeTypes6MatterO27DeviceEnergyManagementTraitV21pauseRequestBatchable8duration5cause0aB3SDK0K7CommandVyytGs6UInt32V_AE19AdjustmentCauseEnumOtKF)


  ` The batchable version of pauseRequest command above.
  See also
  pauseRequest

  #### Declaration

  Swift

      func pauseRequestBatchable(duration: UInt32, cause: https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.DeviceEnergyManagementTrait.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait/AdjustmentCauseEnum.html) throws -> BatchableCommand<Void>

- `


  ### [supportsResumeRequestCommand](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait#/s:15GoogleHomeTypes6MatterO27DeviceEnergyManagementTraitV28supportsResumeRequestCommandSbvp)


  ` Whether the device supports the `resumeRequest` command for this trait.

  #### Declaration

  Swift

      var supportsResumeRequestCommand: Bool { get }

- `


  ### [resumeRequest()](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait#/s:15GoogleHomeTypes6MatterO27DeviceEnergyManagementTraitV13resumeRequestyyYaKF)


  ` Allows a client to cancel the `PauseRequest` command and enable the resumption of the previous
  operation.

  #### Declaration

  Swift

      func resumeRequest() async throws

- `


  ### [resumeRequestBatchable()](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait#/s:15GoogleHomeTypes6MatterO27DeviceEnergyManagementTraitV22resumeRequestBatchable0aB3SDK0K7CommandVyytGyKF)


  ` The batchable version of resumeRequest command above.
  See also
  resumeRequest

  #### Declaration

  Swift

      func resumeRequestBatchable() throws -> BatchableCommand<Void>

- `


  ### [supportsModifyForecastRequestCommand](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait#/s:15GoogleHomeTypes6MatterO27DeviceEnergyManagementTraitV36supportsModifyForecastRequestCommandSbvp)


  ` Whether the device supports the `modifyForecastRequest` command for this trait.

  #### Declaration

  Swift

      var supportsModifyForecastRequestCommand: Bool { get }

- `


  ### [modifyForecastRequest(forecastID:slotAdjustments:cause:)](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait#/s:15GoogleHomeTypes6MatterO27DeviceEnergyManagementTraitV21modifyForecastRequest10forecastID15slotAdjustments5causeys6UInt32V_SayAE20SlotAdjustmentStructVGAE0S9CauseEnumOtYaKF)


  ` Allows an EMS to modify a forecast within the limits allowed by the ESA.

  #### Declaration

  Swift

      func modifyForecastRequest(forecastID: UInt32, slotAdjustments: [https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.DeviceEnergyManagementTrait.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait/SlotAdjustmentStruct.html], cause: https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.DeviceEnergyManagementTrait.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait/AdjustmentCauseEnum.html) async throws

  #### Parameters

  |---|---|
  | ` slotAdjustments ` | A list of `slotAdjustment` parameters that should be modified in the corresponding forecast. |
  | ` cause ` | The cause of the request from the EMS. |

- `


  ### [modifyForecastRequestBatchable(forecastID:slotAdjustments:cause:)](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait#/s:15GoogleHomeTypes6MatterO27DeviceEnergyManagementTraitV30modifyForecastRequestBatchable10forecastID15slotAdjustments5cause0aB3SDK0L7CommandVyytGs6UInt32V_SayAE20SlotAdjustmentStructVGAE0V9CauseEnumOtKF)


  ` The batchable version of modifyForecastRequest command above.
  See also
  modifyForecastRequest

  #### Declaration

  Swift

      func modifyForecastRequestBatchable(forecastID: UInt32, slotAdjustments: [https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.DeviceEnergyManagementTrait.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait/SlotAdjustmentStruct.html], cause: https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.DeviceEnergyManagementTrait.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait/AdjustmentCauseEnum.html) throws -> BatchableCommand<Void>

- `


  ### [supportsRequestConstraintBasedForecastCommand](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait#/s:15GoogleHomeTypes6MatterO27DeviceEnergyManagementTraitV45supportsRequestConstraintBasedForecastCommandSbvp)


  ` Whether the device supports the `requestConstraintBasedForecast` command for this trait.

  #### Declaration

  Swift

      var supportsRequestConstraintBasedForecastCommand: Bool { get }

- `


  ### [requestConstraintBasedForecast(constraints:cause:)](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait#/s:15GoogleHomeTypes6MatterO27DeviceEnergyManagementTraitV30requestConstraintBasedForecast11constraints5causeySayAE17ConstraintsStructVG_AE19AdjustmentCauseEnumOtYaKF)


  ` Allows an EMS to request the ESA to recompute its forecast based on power and time
  constraints.

  #### Declaration

  Swift

      func requestConstraintBasedForecast(constraints: [https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.DeviceEnergyManagementTrait.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait/ConstraintsStruct.html], cause: https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.DeviceEnergyManagementTrait.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait/AdjustmentCauseEnum.html) async throws

  #### Parameters

  |---|---|
  | ` constraints ` | A series of turn-up or turn-down power constraints that the EMS is asking the ESA to adhere to in its forecast. For example, if a grid event requires devices to reduce power (turn down) between 4 p.m. and 6 p.m., and there is excess power on the grid overnight, this may cause an EMS to request that an ESA increase its power demand (turn up) between midnight and 6 a.m. |
  | ` cause ` | The cause of the request from the EMS. |

- `


  ### [requestConstraintBasedForecastBatchable(constraints:cause:)](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait#/s:15GoogleHomeTypes6MatterO27DeviceEnergyManagementTraitV39requestConstraintBasedForecastBatchable11constraints5cause0aB3SDK0M7CommandVyytGSayAE17ConstraintsStructVG_AE19AdjustmentCauseEnumOtKF)


  ` The batchable version of requestConstraintBasedForecast command above.
  See also
  requestConstraintBasedForecast

  #### Declaration

  Swift

      func requestConstraintBasedForecastBatchable(constraints: [https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.DeviceEnergyManagementTrait.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait/ConstraintsStruct.html], cause: https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.DeviceEnergyManagementTrait.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait/AdjustmentCauseEnum.html) throws -> BatchableCommand<Void>

- `


  ### [supportsCancelRequestCommand](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait#/s:15GoogleHomeTypes6MatterO27DeviceEnergyManagementTraitV28supportsCancelRequestCommandSbvp)


  ` Whether the device supports the `cancelRequest` command for this trait.

  #### Declaration

  Swift

      var supportsCancelRequestCommand: Bool { get }

- `


  ### [cancelRequest()](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait#/s:15GoogleHomeTypes6MatterO27DeviceEnergyManagementTraitV13cancelRequestyyYaKF)


  ` Allows an EMS to request cancellation of a previous adjustment request made in a
  `StartTimeAdjustRequest`, `ModifyForecastRequest`, or `RequestConstraintBasedForecast`
  command.

  #### Declaration

  Swift

      func cancelRequest() async throws

- `


  ### [cancelRequestBatchable()](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait#/s:15GoogleHomeTypes6MatterO27DeviceEnergyManagementTraitV22cancelRequestBatchable0aB3SDK0K7CommandVyytGyKF)


  ` The batchable version of cancelRequest command above.
  See also
  cancelRequest

  #### Declaration

  Swift

      func cancelRequestBatchable() throws -> BatchableCommand<Void>

- `


  ### [AdjustmentCauseEnum](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait/AdjustmentCauseEnum.html)


  ` The cause of the adjustment request from the EMS.

  #### Declaration

  Swift

      enum AdjustmentCauseEnum

- `


  ### [CauseEnum](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait/CauseEnum.html)


  ` The cause of the request from the EMS.

  #### Declaration

  Swift

      enum CauseEnum

- `


  ### [CostTypeEnum](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait/CostTypeEnum.html)


  ` The different types of costs.

  #### Declaration

  Swift

      enum CostTypeEnum

- `


  ### [ESAStateEnum](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait/ESAStateEnum.html)


  ` The state of the ESA.

  #### Declaration

  Swift

      enum ESAStateEnum

- `


  ### [ESATypeEnum](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait/ESATypeEnum.html)


  ` The type of the ESA.

  #### Declaration

  Swift

      enum ESATypeEnum

- `


  ### [ForecastUpdateReasonEnum](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait/ForecastUpdateReasonEnum.html)


  ` The reason for updating the forecast.

  #### Declaration

  Swift

      enum ForecastUpdateReasonEnum

- `


  ### [OptOutStateEnum](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait/OptOutStateEnum.html)


  ` The opt-out state of the ESA.

  #### Declaration

  Swift

      enum OptOutStateEnum

- `


  ### [PowerAdjustReasonEnum](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait/PowerAdjustReasonEnum.html)


  ` The reason for the power adjustment.

  #### Declaration

  Swift

      enum PowerAdjustReasonEnum

- `


  ### [Feature](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait/Feature.html)


  ` DeviceEnergyManagement trait FeatureMap.

  #### Declaration

  Swift

      struct Feature