# StateEnum

    enum StateEnum

The state of the electric vehicle.
- `


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


  ` The electric vehicle is not plugged in.

  #### Declaration

  Swift

      case notPluggedIn

- `


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


  ` The electric vehicle is plugged in and is not demanding current.

  #### Declaration

  Swift

      case pluggedInNoDemand

- `


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


  ` The electric vehicle is plugged in and is demanding current, but the EVSE is not allowing
  current to flow.

  #### Declaration

  Swift

      case pluggedInDemand

- `


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


  ` The electric vehicle is plugged in, charging is in progress, and current is flowing.

  #### Declaration

  Swift

      case pluggedInCharging

- `


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


  ` The electric vehicle is plugged in, discharging is in progress, and current is flowing.

  #### Declaration

  Swift

      case pluggedInDischarging

- `


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


  ` The electric vehicle is transitioning from any plugged-in state to `NotPluggedIn`.

  #### Declaration

  Swift

      case sessionEnding

- `


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


  ` The EVSE has detected a fault. See the `https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/EnergyEvseTrait/Attributes.html#/s:15GoogleHomeTypes6MatterO15EnergyEvseTraitV10AttributesV10faultStateAE05FaultJ4EnumOSgvp` attribute for
  more information.

  #### Declaration

  Swift

      case fault

- `


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