# OptOutStateEnum

    enum OptOutStateEnum

The opt-out state of the ESA.
- `


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


  ` The user has not opted out of either local or grid optimizations.

  #### Declaration

  Swift

      case noOptOut

- `


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


  ` The user has opted out of local EMS optimizations only.

  #### Declaration

  Swift

      case localOptOut

- `


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


  ` The user has opted out of grid EMS optimizations only.

  #### Declaration

  Swift

      case gridOptOut

- `


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


  ` The user has opted out of all external optimizations.

  #### Declaration

  Swift

      case optOut

- `


  ### [init(rawValue:)](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait/OptOutStateEnum#/s:15GoogleHomeTypes6MatterO27DeviceEnergyManagementTraitV15OptOutStateEnumO8rawValueAGSgs6UInt64V_tcfc)


  ` Creates a new instance with the specified raw value.

  If there is no value of the type that corresponds with the specified raw
  value, this initializer returns `nil`. For example:

      enum PaperSize: String {
          case A4, A5, Letter, Legal
      }

      print(PaperSize(rawValue: "Legal"))
      // Prints "Optional(PaperSize.Legal)"

      print(PaperSize(rawValue: "Tabloid"))
      // Prints "nil"

  #### Declaration

  Swift

      init?(rawValue: UInt64)

  #### Parameters

  |---|---|
  | ` rawValue ` | The raw value to use for the new instance. |