<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: -"
  ],
  "documentType" : "symbol",
  "framework" : "EnergyKit",
  "identifier" : "/documentation/EnergyKit/ElectricVehicleStatusEvent",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "EnergyKit"
    ],
    "preciseIdentifier" : "s:9EnergyKit26ElectricVehicleStatusEventV"
  },
  "title" : "ElectricVehicleStatusEvent"
}
-->

# ElectricVehicleStatusEvent

An event that represents the status of an electric vehicle while connected to a charger.

```
struct ElectricVehicleStatusEvent
```

## Overview

Status events can provide additional information in connection with a [`ElectricVehicleLoadEvent`](/documentation/EnergyKit/ElectricVehicleLoadEvent) by explaining why a vehicle isn’t charging when connected, when charging will begin, and why charging started or stopped. Unlike load events, which track session-based energy flow with information about continuity included, status events are point-in-time observations without session context. For example, when a vehicle waits for cleaner energy before charging begins, a status event captures this idle state and explains the delay, even though no load event session exists.

Submit status events to provide visibility into vehicle behavior and enable the Home app to display an informative activity log.

For an example that uses status events, see [Optimizing home electricity usage](/documentation/EnergyKit/optimizing-home-electricity-usage).

## Topics

### Creating a status event

[`init(timestamp: Date, device: ElectricalLoadDevice, venueID: UUID, status: ElectricVehicleStatusEvent.Status, stateOfCharge: Int, energy: Measurement<UnitEnergy>, estimatedRange: Measurement<UnitLength>?, chargingTarget: ElectricVehicleStatusEvent.ChargingTarget?, sessionIdentifier: UUID?)`](/documentation/EnergyKit/ElectricVehicleStatusEvent/init(timestamp:device:venueID:status:stateOfCharge:energy:estimatedRange:chargingTarget:sessionIdentifier:))

Creates an electric vehicle status event.

### Getting status information

[`let status: ElectricVehicleStatusEvent.Status`](/documentation/EnergyKit/ElectricVehicleStatusEvent/status-swift.property)

The current status of the vehicle relative to charger connection.

[`enum Status`](/documentation/EnergyKit/ElectricVehicleStatusEvent/Status-swift.enum)

The status of an electric vehicle’s charger connection.

[`let stateOfCharge: Int`](/documentation/EnergyKit/ElectricVehicleStatusEvent/stateOfCharge)

A state of charge as a percentage at the time of the status event.

[`let energy: Measurement<UnitEnergy>`](/documentation/EnergyKit/ElectricVehicleStatusEvent/energy)

A state of charge in milliwatt-hours at the time of the status event.

[`let estimatedRange: Measurement<UnitLength>?`](/documentation/EnergyKit/ElectricVehicleStatusEvent/estimatedRange)

An estimated range of driving distance based on the current energy state.

### Getting charging targets

[`let chargingTarget: ElectricVehicleStatusEvent.ChargingTarget?`](/documentation/EnergyKit/ElectricVehicleStatusEvent/chargingTarget-swift.property)

The desired target when charging an electric vehicle.

[`struct ChargingTarget`](/documentation/EnergyKit/ElectricVehicleStatusEvent/ChargingTarget-swift.struct)

The desired target when charging an electric vehicle.

### Identifying the event

[`let id: UUID`](/documentation/EnergyKit/ElectricVehicleStatusEvent/id)

A unique identifier for the status event.

[`let timestamp: Date`](/documentation/EnergyKit/ElectricVehicleStatusEvent/timestamp)

The time when the status event occurs.

[`let sessionIdentifier: UUID?`](/documentation/EnergyKit/ElectricVehicleStatusEvent/sessionIdentifier)

A unique identifier for the session.

### Identifying the device and venue

[`let deviceID: String`](/documentation/EnergyKit/ElectricVehicleStatusEvent/deviceID)

A unique, stable identifier for the device.

[`let deviceName: String`](/documentation/EnergyKit/ElectricVehicleStatusEvent/deviceName)

A human-readable name for the device.

[`let venueID: UUID`](/documentation/EnergyKit/ElectricVehicleStatusEvent/venueID)

An identifier for the venue in which the event occurs.

## Relationships

### Conforms To

[`Hashable`](/documentation/Swift/Hashable)

[`Equatable`](/documentation/Swift/Equatable)

[`Identifiable`](/documentation/Swift/Identifiable)

[`Encodable`](/documentation/Swift/Encodable)

[`ElectricalLoadEventProtocol`](/documentation/EnergyKit/ElectricalLoadEventProtocol)

[`Decodable`](/documentation/Swift/Decodable)

[`Sendable`](/documentation/Swift/Sendable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)