# EnergyEvseTrait.Attributes

# EnergyEvseTrait.Attributes


```
@Generated(value = ["GoogleHomePlatformCodegen"])
interface EnergyEvseTrait.Attributes : ClusterStruct
```

<br />

Known direct subclasses [EnergyEvse](https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/EnergyEvse)

|---|---|
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/EnergyEvse` | API for the EnergyEvse trait. |

*** ** * ** ***

Attributes for the EnergyEvse cluster.

## Summary

| ### Public functions |
|---|---|
| `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/EnergyEvseTrait.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/EnergyEvseTrait.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. |

| ### Public properties |
|---|---|
| `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/EnergyEvseTrait.Attributes#acceptedCommandList()` A list of client-generated commands which are supported by this cluster server 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/EnergyEvseTrait.Attributes#approximateEvEfficiency()` The vehicle efficiency rating for a connected vehicle. |
| `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/EnergyEvseTrait.Attributes#attributeList()` A list of the attribute IDs of the attributes supported by the cluster instance. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/EnergyEvseTrait.Attributes#batteryCapacity()` The capacity of the electric vehicle battery in milliwatt hours. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/EnergyEvseTrait.Attributes#chargingEnabledUntil()` The time, in UTC, when the EVSE automatically stops current flow to the electric vehicle. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/EnergyEvseTrait.Attributes#circuitCapacity()` The capacity that the EVSE circuit can provide. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-short/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/EnergyEvseTrait.Attributes#clusterRevision()` The revision of the server cluster specification supported by the cluster instance. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/EnergyEvseTrait.Attributes#dischargingEnabledUntil()` The time, in UTC, when the EVSE automatically stops current flow from the electric vehicle. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/EnergyEvseTrait.FaultStateEnum?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/EnergyEvseTrait.Attributes#faultState()` The type of fault detected by the EVSE. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/EnergyEvseTrait.Feature` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/EnergyEvseTrait.Attributes#featureMap()` Whether the server supports zero or more optional cluster features. |
| `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/EnergyEvseTrait.Attributes#generatedCommandList()` A list of server-generated commands (server to client) which are supported by this cluster server instance. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/EnergyEvseTrait.Attributes#maximumChargeCurrent()` The maximum current, in milliamps, that the EVSE can deliver to the electric vehicle. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/EnergyEvseTrait.Attributes#maximumDischargeCurrent()` The maximum current, in milliamps, that the EVSE can receive from the electric vehicle. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/EnergyEvseTrait.Attributes#minimumChargeCurrent()` The minimum current, in milliamps, that the EVSE can deliver to the electric vehicle. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/EnergyEvseTrait.Attributes#nextChargeRequiredEnergy()` The amount of energy, in megawatt hours, that the EVSE will attempt to add to the vehicle in the next charging target. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/EnergyEvseTrait.Attributes#nextChargeStartTime()` The time, in UTC, when the EVSE is scheduled to start the next charge based on the charging preferences. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-byte/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/EnergyEvseTrait.Attributes#nextChargeTargetSoC()` The target state of charge (SoC), in percent, that the EVSE will attempt to reach when the vehicle is next charged. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/EnergyEvseTrait.Attributes#nextChargeTargetTime()` The time, in UTC, when the EVSE should complete the next scheduled charge based on the charging preferences. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/EnergyEvseTrait.Attributes#randomizationDelayWindow()` The time of a random window, in seconds, over which the EVSE randomizes the start of a charging session. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/EnergyEvseTrait.Attributes#sessionDuration()` The duration, in seconds, for the current or most recent charging session. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/EnergyEvseTrait.Attributes#sessionEnergyCharged()` The energy, in milliwatt hours, delivered by the EVSE to the electric vehicle for the current or most recent charging session. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/EnergyEvseTrait.Attributes#sessionEnergyDischarged()` The energy, in milliwatt hours, received by the EVSE from the electric vehicle for the current or most recent charging session. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/EnergyEvseTrait.Attributes#sessionId()` A unique identifier for the current or most recent session. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/EnergyEvseTrait.StateEnum?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/EnergyEvseTrait.Attributes#state()` The current status of the EVSE. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-byte/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/EnergyEvseTrait.Attributes#stateOfCharge()` The state of charge (SOC) of the electric vehicle battery in one-percent increments. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/EnergyEvseTrait.SupplyStateEnum?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/EnergyEvseTrait.Attributes#supplyState()` Indicates whether the electric vehicle is currently allowed to charge from the EVSE or discharge to the EVSE. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/EnergyEvseTrait.Attributes#userMaximumChargeCurrent()` The maximum current, in milliamps, that the consumer can set as a preference to further reduce the charging rate. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/EnergyEvseTrait.Attributes#vehicleId()` The vehicle ID read by the EVSE via ISO-15118 using the Plug \& Charge (PnC) feature, if the EVSE supports this capability. |

## Public functions

### getDescriptor

```
@HomeExperimentalGenericApi
open fun getDescriptor(): StructDescriptor
```

Returns the descriptor for the struct.

### getFieldValueById

```
@HomeExperimentalGenericApi
open fun getFieldValueById(tagId: UInt): Any?
```

Returns the value of the field for the given tag ID.

## Public properties

### acceptedCommandList

```
val acceptedCommandList: List<UInt>
```

A list of client-generated commands which are supported by this cluster server instance.

### approximateEvEfficiency

```
val approximateEvEfficiency: UShort?
```

The vehicle efficiency rating for a connected vehicle. This value is stored in kilometers per killowatt hours multiplied by a scaling factor of 1000. This can be used to help indicate to the user approximately how many miles or kilometers of range will be added. A null value indicates that the EV efficiency is unknown and the `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/EnergyEvseTrait.Attributes#nextChargeRequiredEnergy()` attribute cannot be converted from megawatt hours to miles or kilometers.

**Access type:** Write

### attributeList

```
val attributeList: List<UInt>
```

A list of the attribute IDs of the attributes supported by the cluster instance.

### batteryCapacity

```
val batteryCapacity: Long?
```

The capacity of the electric vehicle battery in milliwatt hours.

**Access type:** Read

### chargingEnabledUntil

```
val chargingEnabledUntil: UInt?
```

The time, in UTC, when the EVSE automatically stops current flow to the electric vehicle. If the value is null, charging is permanently enabled. If the value is in the past, charging is disabled. This attribute is set only as part of the payload of the `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/EnergyEvseTrait.EnableChargingCommand` command. This attribute is persisted, for example a temporary power failure should not stop the vehicle from charging.

**Access type:** Read

### circuitCapacity

```
val circuitCapacity: Long?
```

The capacity that the EVSE circuit can provide.

**Access type:** Read

### clusterRevision

```
val clusterRevision: UShort
```

The revision of the server cluster specification supported by the cluster instance.

### dischargingEnabledUntil

```
val dischargingEnabledUntil: UInt?
```

The time, in UTC, when the EVSE automatically stops current flow from the electric vehicle. If the value is null, discharging is permanently enabled. If the value is in the past or 0x0, discharging is disabled. This attribute is set only as part of the payload of the `EnableDischarging` command. This attribute is persisted, for example a temporary power failure should not stop the vehicle from discharging.

**Access type:** Read

### faultState

```
val faultState: EnergyEvseTrait.FaultStateEnum?
```

The type of fault detected by the EVSE. When the `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/EnergyEvseTrait.Attributes#supplyState()` attribute is `DisabledError`, the `faultState` attribute is one of the values listed in `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/EnergyEvseTrait.FaultStateEnum`, except for `NoError`. For all values of the `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/EnergyEvseTrait.Attributes#supplyState()` attribute other than `DisabledError`, the `faultState` attribute is `noError`.

**Access type:** Read

### featureMap

```
val featureMap: EnergyEvseTrait.Feature
```

Whether the server supports zero or more optional cluster features. A cluster feature is a set of cluster elements that are mandatory or optional for a defined feature of the cluster. If a cluster feature is supported by the cluster instance, then the corresponding bit is set to 1, otherwise the bit is set to 0 (zero).

### generatedCommandList

```
val generatedCommandList: List<UInt>
```

A list of server-generated commands (server to client) which are supported by this cluster server instance.

### maximumChargeCurrent

```
val maximumChargeCurrent: Long?
```

The maximum current, in milliamps, that the EVSE can deliver to the electric vehicle. The attribute can be initially set using the `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/EnergyEvseTrait.EnableChargingCommand` command or by adjusting the `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/EnergyEvseTrait.Attributes#userMaximumChargeCurrent()` attribute. The value of the `maximumChargeCurrent` attribute is the minimum of: `CircuitCapacity` (the electrician's installation setting), `CableAssemblyCurrentLimit` (detected by the EVSE when the cable is plugged in), the `MaximumChargeCurrent` field in the `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/EnergyEvseTrait.EnableChargingCommand` command, and the `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/EnergyEvseTrait.Attributes#userMaximumChargeCurrent()` attribute.

**Access type:** Read

### maximumDischargeCurrent

```
val maximumDischargeCurrent: Long?
```

The maximum current, in milliamps, that the EVSE can receive from the electric vehicle. The attribute can be set using the `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/EnergyEvseTrait.EnableDischargingCommand` command. The value of the `maximumDischargeCurrent` attribute is the minimum of: `CircuitCapacity` (the electrician's installation setting), `CableAssemblyCurrentLimit` (detected by the EVSE when the cable is plugged in), and the `MaximumDischargeCurrent` field in the `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/EnergyEvseTrait.EnableDischargingCommand` command.

**Access type:** Read

### minimumChargeCurrent

```
val minimumChargeCurrent: Long?
```

The minimum current, in milliamps, that the EVSE can deliver to the electric vehicle. The attribute can be set using the `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/EnergyEvseTrait.EnableChargingCommand` command.

**Access type:** Read

### nextChargeRequiredEnergy

```
val nextChargeRequiredEnergy: Long?
```

The amount of energy, in megawatt hours, that the EVSE will attempt to add to the vehicle in the next charging target. A null indicates that there is no scheduled charging or that the EVSE is using the target state of charge method to charge the vehicle.

**Access type:** Read

### nextChargeStartTime

```
val nextChargeStartTime: UInt?
```

The time, in UTC, when the EVSE is scheduled to start the next charge based on the charging preferences. A null value indicates that there is no scheduled charging or that the vehicle is not plugged in.

**Access type:** Read

### nextChargeTargetSoC

```
val nextChargeTargetSoC: UByte?
```

The target state of charge (SoC), in percent, that the EVSE will attempt to reach when the vehicle is next charged. A null value indicates that there is no scheduled charging or that the EVSE cannot obtain the current SoC from the vehicle. If the SoC feature is not supported, only the values `null` and `100` are supported.

**Access type:** Read

### nextChargeTargetTime

```
val nextChargeTargetTime: UInt?
```

The time, in UTC, when the EVSE should complete the next scheduled charge based on the charging preferences. A null value indicates that there is no scheduled charging or that the vehicle is not plugged in.

**Access type:** Read

### randomizationDelayWindow

```
val randomizationDelayWindow: UInt?
```

The time of a random window, in seconds, over which the EVSE randomizes the start of a charging session. For example, if the `randomizationDelayWindow` is 600 seconds and there is an energy rate starting at 00:30, then the EVSE must compute a random delay between 0-599 seconds and add this to its initial planned start time.

**Access type:** Write

### sessionDuration

```
val sessionDuration: UInt?
```

The duration, in seconds, for the current or most recent charging session. A default value of null indicates that no sessions have occurred. A charging session begins when the vehicle is plugged in and ends when the vehicle is unplugged.

**Access type:** Read

### sessionEnergyCharged

```
val sessionEnergyCharged: Long?
```

The energy, in milliwatt hours, delivered by the EVSE to the electric vehicle for the current or most recent charging session. A default value of null indicates that no sessions have occurred.

**Access type:** Read

### sessionEnergyDischarged

```
val sessionEnergyDischarged: Long?
```

The energy, in milliwatt hours, received by the EVSE from the electric vehicle for the current or most recent charging session. A default value of null indicates that no sessions have occurred.

**Access type:** Read

### sessionId

```
val sessionId: UInt?
```

A unique identifier for the current or most recent session. A default value of null indicates that no sessions have occurred. The `sessionId` gets incremented each time a plugin is detected. A session begins when the vehicle is plugged in and ends when the vehicle is unplugged.

**Access type:** Read

### state

```
val state: EnergyEvseTrait.StateEnum?
```

The current status of the EVSE.

**Access type:** Read

### stateOfCharge

```
val stateOfCharge: UByte?
```

The state of charge (SOC) of the electric vehicle battery in one-percent increments. The values are in the range of 0-100%. This attribute is available only on EVSEs that can read the SoC from the vehicle and that support the SoC feature. If the SoC cannot be read from the vehicle, the value of the attribute is null.

**Access type:** Read

### supplyState

```
val supplyState: EnergyEvseTrait.SupplyStateEnum?
```

Indicates whether the electric vehicle is currently allowed to charge from the EVSE or discharge to the EVSE.

**Access type:** Read

### userMaximumChargeCurrent

```
val userMaximumChargeCurrent: Long?
```

The maximum current, in milliamps, that the consumer can set as a preference to further reduce the charging rate.

**Access type:** Write

### vehicleId

```
val vehicleId: String?
```

The vehicle ID read by the EVSE via ISO-15118 using the Plug \& Charge (PnC) feature, if the EVSE supports this capability. The field may be based on the e-Mobility Account Identifier (EMAID). A null value indicates that the ID is unknown.

**Access type:** Read