    struct EnergyEvseTrait

This trait is for devices that provide electric vehicle supply equipment (EVSE) functionality.
- `


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


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

  #### Declaration

  Swift

      static let supportedEventTypes: [any Event.Type]

- `


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


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

  #### Declaration

  Swift

      static let supportedCommandTypes: [any Command.Type]

- `


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


  ` The trait identifier.

  #### Declaration

  Swift

      static let identifier: String

- `


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


  ` Metadata about this `Trait`.

  #### Declaration

  Swift

      let metadata: TraitMetadata

- `


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


  ` List of attributes for the `EnergyEvseTrait`.

  #### Declaration

  Swift

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

- `


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


  ` 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/EnergyEvseTrait#/s:15GoogleHomeTypes6MatterO15EnergyEvseTraitV6encode4withy0aB3SDK0G7EncoderC_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/EnergyEvseTrait#/s:15GoogleHomeTypes6MatterO15EnergyEvseTraitV9forceReadyyYaKF)


  ` 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/EnergyEvseTrait/Attributes.html)


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

  #### Declaration

  Swift

      struct Attributes

- `


  ### [==(_:_:)](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/EnergyEvseTrait#/s:15GoogleHomeTypes6MatterO15EnergyEvseTraitV2eeoiySbAE_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.EnergyEvseTrait, rhs: https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.EnergyEvseTrait) -> Bool

  #### Parameters

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

- `


  ### [hash(into:)](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/EnergyEvseTrait#/s:15GoogleHomeTypes6MatterO15EnergyEvseTraitV4hash4intoys6HasherVz_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)

- `


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


  ` A set of user-specified charging targets for an electric vehicle for a set of specified days.

  #### Declaration

  Swift

      struct ChargingTargetScheduleStruct

- `


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


  ` A single user-specified charging target for an electric vehicle.

  #### Declaration

  Swift

      struct ChargingTargetStruct

- `


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


  ` Notification that the electric vehicle has connected to the EVSE.

  #### Declaration

  Swift

      struct EVConnectedEvent

- `


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


  ` Notification that the electric vehicle has been removed from the EVSE.

  #### Declaration

  Swift

      struct EVNotDetectedEvent

- `


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


  ` Notification that the electric vehicle has started charging or discharging.

  #### Declaration

  Swift

      struct EnergyTransferStartedEvent

- `


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


  ` Notification that the electric vehicle has stopped charging or discharging.

  #### Declaration

  Swift

      struct EnergyTransferStoppedEvent

- `


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


  ` Notification of a fault in the EVSE. The `https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/EnergyEvseTrait/Attributes.html#/s:15GoogleHomeTypes6MatterO15EnergyEvseTraitV10AttributesV11supplyStateAE06SupplyJ4EnumOSgvp`
  attribute gets set to `DisabledError` and the type of fault detected by the EVSE is stored
  in the `https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/EnergyEvseTrait/Attributes.html#/s:15GoogleHomeTypes6MatterO15EnergyEvseTraitV10AttributesV10faultStateAE05FaultJ4EnumOSgvp` attribute.

  #### Declaration

  Swift

      struct FaultEvent

- `


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


  ` Notification that a radio frequency identification card (RFID) has been read. This allows
  a controller to register the card ID and use the ID to authenticate the user and start the
  charging session.

  #### Declaration

  Swift

      struct RfidEvent

- `


  ### [supportsDisableCommand](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/EnergyEvseTrait#/s:15GoogleHomeTypes6MatterO15EnergyEvseTraitV22supportsDisableCommandSbvp)


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

  #### Declaration

  Swift

      var supportsDisableCommand: Bool { get }

- `


  ### [disable()](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/EnergyEvseTrait#/s:15GoogleHomeTypes6MatterO15EnergyEvseTraitV7disableyyYaKF)


  ` Disables the EVSE from charging and discharging.

  #### Declaration

  Swift

      func disable() async throws

- `


  ### [disableBatchable()](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/EnergyEvseTrait#/s:15GoogleHomeTypes6MatterO15EnergyEvseTraitV16disableBatchable0aB3SDK0I7CommandVyytGyKF)


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

  #### Declaration

  Swift

      func disableBatchable() throws -> BatchableCommand<Void>

- `


  ### [supportsEnableChargingCommand](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/EnergyEvseTrait#/s:15GoogleHomeTypes6MatterO15EnergyEvseTraitV29supportsEnableChargingCommandSbvp)


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

  #### Declaration

  Swift

      var supportsEnableChargingCommand: Bool { get }

- `


  ### [enableCharging(chargingEnabledUntil:minimumChargeCurrent:maximumChargeCurrent:)](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/EnergyEvseTrait#/s:15GoogleHomeTypes6MatterO15EnergyEvseTraitV14enableCharging20chargingEnabledUntil20minimumChargeCurrent07maximumnO0ys6UInt32VSg_s5Int64VANtYaKF)


  ` Enables the EVSE to charge an electric vehicle.

  #### Declaration

  Swift

      func enableCharging(chargingEnabledUntil: UInt32?, minimumChargeCurrent: Int64, maximumChargeCurrent: Int64) async throws

  #### Parameters

  |---|---|
  | ` chargingEnabledUntil ` | The time, in UTC, when charging becomes disabled. If the value is in the past, charging is disabled. If the value is null, charging is permanently enabled. |
  | ` minimumChargeCurrent ` | The minimum current, in milliamps, that the EVSE can deliver to the electric vehicle. |
  | ` maximumChargeCurrent ` | The maximum current, in milliamps, that the EVSE can deliver to the electric vehicle. |

- `


  ### [enableChargingBatchable(chargingEnabledUntil:minimumChargeCurrent:maximumChargeCurrent:)](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/EnergyEvseTrait#/s:15GoogleHomeTypes6MatterO15EnergyEvseTraitV23enableChargingBatchable20chargingEnabledUntil20minimumChargeCurrent07maximumoP00aB3SDK0J7CommandVyytGs6UInt32VSg_s5Int64VARtKF)


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

  #### Declaration

  Swift

      func enableChargingBatchable(chargingEnabledUntil: UInt32?, minimumChargeCurrent: Int64, maximumChargeCurrent: Int64) throws -> BatchableCommand<Void>

- `


  ### [supportsEnableDischargingCommand](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/EnergyEvseTrait#/s:15GoogleHomeTypes6MatterO15EnergyEvseTraitV32supportsEnableDischargingCommandSbvp)


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

  #### Declaration

  Swift

      var supportsEnableDischargingCommand: Bool { get }

- `


  ### [enableDischarging(dischargingEnabledUntil:maximumDischargeCurrent:)](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/EnergyEvseTrait#/s:15GoogleHomeTypes6MatterO15EnergyEvseTraitV17enableDischarging23dischargingEnabledUntil23maximumDischargeCurrentys6UInt32VSg_s5Int64VtYaKF)


  ` Enables the EVSE to discharge an electric vehicle.

  #### Declaration

  Swift

      func enableDischarging(dischargingEnabledUntil: UInt32?, maximumDischargeCurrent: Int64) async throws

  #### Parameters

  |---|---|
  | ` dischargingEnabledUntil ` | The time, in UTC, when discharging becomes disabled. If the value is in the past, discharging is disabled. If the value is null, discharging is permanently enabled. |
  | ` maximumDischargeCurrent ` | The maximum current, in milliamps, that the EVSE can receive from the electric vehicle. |

- `


  ### [enableDischargingBatchable(dischargingEnabledUntil:maximumDischargeCurrent:)](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/EnergyEvseTrait#/s:15GoogleHomeTypes6MatterO15EnergyEvseTraitV26enableDischargingBatchable23dischargingEnabledUntil23maximumDischargeCurrent0aB3SDK0J7CommandVyytGs6UInt32VSg_s5Int64VtKF)


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

  #### Declaration

  Swift

      func enableDischargingBatchable(dischargingEnabledUntil: UInt32?, maximumDischargeCurrent: Int64) throws -> BatchableCommand<Void>

- `


  ### [supportsStartDiagnosticsCommand](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/EnergyEvseTrait#/s:15GoogleHomeTypes6MatterO15EnergyEvseTraitV31supportsStartDiagnosticsCommandSbvp)


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

  #### Declaration

  Swift

      var supportsStartDiagnosticsCommand: Bool { get }

- `


  ### [startDiagnostics()](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/EnergyEvseTrait#/s:15GoogleHomeTypes6MatterO15EnergyEvseTraitV16startDiagnosticsyyYaKF)


  ` Puts the EVSE into self-diagnostics mode as long as the
  `https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/EnergyEvseTrait/Attributes.html#/s:15GoogleHomeTypes6MatterO15EnergyEvseTraitV10AttributesV11supplyStateAE06SupplyJ4EnumOSgvp` attribute is in the `Disabled` state when the command
  is sent.

  #### Declaration

  Swift

      func startDiagnostics() async throws

- `


  ### [startDiagnosticsBatchable()](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/EnergyEvseTrait#/s:15GoogleHomeTypes6MatterO15EnergyEvseTraitV25startDiagnosticsBatchable0aB3SDK0J7CommandVyytGyKF)


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

  #### Declaration

  Swift

      func startDiagnosticsBatchable() throws -> BatchableCommand<Void>

- `


  ### [supportsSetTargetsCommand](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/EnergyEvseTrait#/s:15GoogleHomeTypes6MatterO15EnergyEvseTraitV25supportsSetTargetsCommandSbvp)


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

  #### Declaration

  Swift

      var supportsSetTargetsCommand: Bool { get }

- `


  ### [setTargets(chargingTargetSchedules:)](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/EnergyEvseTrait#/s:15GoogleHomeTypes6MatterO15EnergyEvseTraitV10setTargets23chargingTargetSchedulesySayAE08ChargingK14ScheduleStructVG_tYaKF)


  ` Allows a client to set user-specified charging targets.

  #### Declaration

  Swift

      func setTargets(chargingTargetSchedules: [https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.EnergyEvseTrait.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/EnergyEvseTrait/ChargingTargetScheduleStruct.html]) async throws

  #### Parameters

  |---|---|
  | ` chargingTargetSchedules ` | A list of up to seven sets of daily charging targets and their associated days of the week. Each day of the week can be included in only a single `chargingTargetSchedule` in this field. |

- `


  ### [setTargetsBatchable(chargingTargetSchedules:)](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/EnergyEvseTrait#/s:15GoogleHomeTypes6MatterO15EnergyEvseTraitV19setTargetsBatchable23chargingTargetSchedules0aB3SDK0J7CommandVyytGSayAE08ChargingL14ScheduleStructVG_tKF)


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

  #### Declaration

  Swift

      func setTargetsBatchable(chargingTargetSchedules: [https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.EnergyEvseTrait.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/EnergyEvseTrait/ChargingTargetScheduleStruct.html]) throws -> BatchableCommand<Void>

- `


  ### [supportsGetTargetsCommand](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/EnergyEvseTrait#/s:15GoogleHomeTypes6MatterO15EnergyEvseTraitV25supportsGetTargetsCommandSbvp)


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

  #### Declaration

  Swift

      var supportsGetTargetsCommand: Bool { get }

- `


  ### [getTargets()](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/EnergyEvseTrait#/s:15GoogleHomeTypes6MatterO15EnergyEvseTraitV10getTargetsAE03GetI7CommandV8ResponseVyYaKF)


  ` Allows a client to retrieve the current set of charging targets.

  #### Declaration

  Swift

      func getTargets() async throws -> https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.EnergyEvseTrait.GetTargetsCommandResponse

  #### Return Value

  The result of the `GetTargets` command.
- `


  ### [getTargetsBatchable()](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/EnergyEvseTrait#/s:15GoogleHomeTypes6MatterO15EnergyEvseTraitV19getTargetsBatchable0aB3SDK0J7CommandVyAE03GetiL0V8ResponseVGyKF)


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

  #### Declaration

  Swift

      func getTargetsBatchable() throws -> BatchableCommand<https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.EnergyEvseTrait.GetTargetsCommandResponse>

- `


  ### [supportsClearTargetsCommand](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/EnergyEvseTrait#/s:15GoogleHomeTypes6MatterO15EnergyEvseTraitV27supportsClearTargetsCommandSbvp)


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

  #### Declaration

  Swift

      var supportsClearTargetsCommand: Bool { get }

- `


  ### [clearTargets()](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/EnergyEvseTrait#/s:15GoogleHomeTypes6MatterO15EnergyEvseTraitV12clearTargetsyyYaKF)


  ` Allows a client to clear all stored charging targets.

  #### Declaration

  Swift

      func clearTargets() async throws

- `


  ### [clearTargetsBatchable()](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/EnergyEvseTrait#/s:15GoogleHomeTypes6MatterO15EnergyEvseTraitV21clearTargetsBatchable0aB3SDK0J7CommandVyytGyKF)


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

  #### Declaration

  Swift

      func clearTargetsBatchable() throws -> BatchableCommand<Void>

- `


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


  ` The reason for stopping the energy transfer.

  #### Declaration

  Swift

      enum EnergyTransferStoppedReasonEnum

- `


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


  ` The fault state of the EVSE.

  #### Declaration

  Swift

      enum FaultStateEnum

- `


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


  ` The state of the electric vehicle.

  #### Declaration

  Swift

      enum StateEnum

- `


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


  ` Whether the electric vehicle is allowed to charge or disharge.

  #### Declaration

  Swift

      enum SupplyStateEnum

- `


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


  ` EnergyEvse cluster FeatureMap.

  #### Declaration

  Swift

      struct Feature

- `


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


  ` The day of the week.

  #### Declaration

  Swift

      struct TargetDayOfWeekBitmap