---
title: ElectricVehicleLoadEvent
framework: energykit
role: symbol
role_heading: Structure
path: energykit/electricvehicleloadevent
---

# ElectricVehicleLoadEvent

A measurement of the electricity consumed or generated by an electric vehicle while connected to a charger.

## Declaration

```swift
struct ElectricVehicleLoadEvent
```

## Mentioned in

Providing charging history for electric vehicles

## Overview

Overview Submit load events to track session-based energy consumption and enable the framework to provide insights about electricity usage and adherence to ElectricityGuidance. Load events focus on energy flow during active charging sessions. Load events include an indication of continuity, specifying the event’s beginning, active state, and end. Include ElectricVehicleStatusEvent in your load events to explain why charging behavior occurs and provide rich activity logs in the Home app. When you adopt the EnergyKit LoadEvents Entitlement, the Home app displays your device’s energy usage with the device name and performance metrics you provide. important: The system stores and syncs the energy data that you provide through load events with end-to-end encryption through the entire process, ensuring the data isn’t accessible to anyone, even Apple. For more information, see EnergyKit data security. Submit electrical vehicle load events Sample load events more frequently as charging conditions become more volatile. During stable charging — when power remains constant, with no user interventions — one sample every 15 minutes (at 0, 15, 30, and 45-minute marks) is sufficient. During volatile periods — when charging power fluctuates, a person pauses or resumes charging, or the vehicle adjusts its charge rate — submit additional events to capture the transitions. Significant changes may include: A person initiated an action A pause in power consumption such as going idle The power changed Unplugged or idle vehicles between charging sessions don’t generate events. The device that requested ElectricityGuidance must submit the corresponding load events. note: The Home app displays all load events for a given EnergyVenue. Separate charging and discharging sessions If your vehicle supports vehicle-to-grid (V2G) or vehicle-to-home (V2H) capabilities, use separate sessions for charging and discharging. Separate charging and discharging into individual sessions, even if they occur simultaneously, to allow the system to distinguish between them in the data.

## Topics

### Creating an electrical load event

- [init(timestamp:measurement:session:device:)](energykit/electricvehicleloadevent/init(timestamp:measurement:session:device:).md)

### Getting load event information

- [id](energykit/electricvehicleloadevent/id.md)
- [timestamp](energykit/electricvehicleloadevent/timestamp.md)
- [session](energykit/electricvehicleloadevent/session-swift.property.md)
- [ElectricVehicleLoadEvent.Session](energykit/electricvehicleloadevent/session-swift.struct.md)

### Getting device information

- [deviceID](energykit/electricvehicleloadevent/deviceid.md)
- [deviceName](energykit/electricvehicleloadevent/devicename.md)

### Getting electrical measurements

- [measurement](energykit/electricvehicleloadevent/measurement.md)
- [ElectricVehicleLoadEvent.ElectricalMeasurement](energykit/electricvehicleloadevent/electricalmeasurement.md)

### Deprecated

- [init(timestamp:measurement:session:deviceID:)](energykit/electricvehicleloadevent/init(timestamp:measurement:session:deviceid:).md)

## Relationships

### Conforms To

- [Decodable](swift/decodable.md)
- [ElectricalLoadEventProtocol](energykit/electricalloadeventprotocol.md)
- [Encodable](swift/encodable.md)
- [Identifiable](swift/identifiable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Electric vehicle events

- [ElectricVehicleStatusEvent](energykit/electricvehiclestatusevent.md)
- [ElectricVehicleChargingReason](energykit/electricvehiclechargingreason.md)
