One Logo Pool Ball
EnergyKit · IOS API REFERENCE

ElectricVehicleStatusEvent

struct · iOS 27.0+ · SDK 27.1

struct ElectricVehicleStatusEvent

An event representing the status of an electric vehicle while connected to a charger. Status events are discrete snapshots that capture the vehicle's state independent of charging sessions. They complement ``ElectricVehicleLoadEvent`` by providing visibility into why the vehicle isn't charging when plugged in, helping answer product questions like "when will charging begin?" Unlike ``ElectricVehicleLoadEvent`` which tracks session-based energy flow with continuity, status events are point-in-time observations without session context.

Members (12)

get · iOS 27.0+

deviceName

TypeScript
get deviceName(): string
Swift declaration
let deviceName: String

A human-readable name for the device. The max length is `250 UTF-16` characters. Names that violate these rules are automatically sanitized: - Isn't empty, and less than or equal to 250 characters. - Contains only alphanumeric, whitespace, punctuation, or symbol characters.

get · iOS 27.0+

stateOfCharge

TypeScript
get stateOfCharge(): number
Swift declaration
let stateOfCharge: Int

State of charge as a percentage (0-100) at time of status event

get · iOS 27.0+

chargingTarget

TypeScript
get chargingTarget(): (ElectricVehicleStatusEvent_ChargingTarget) | null
Swift declaration
let chargingTarget: ElectricVehicleStatusEvent.ChargingTarget?

Target information for the charging session, or `nil` if unavailable

get · iOS 27.0+

estimatedRange

TypeScript
get estimatedRange(): (_Foundation_Measurement<_Foundation_UnitLength>) | null
Swift declaration
let estimatedRange: Measurement<UnitLength>?

Estimated range based on current energy state

get · iOS 27.0+

sessionIdentifier

TypeScript
get sessionIdentifier(): (string) | null
Swift declaration
let sessionIdentifier: UUID?

Session identifier from the associated ``ElectricVehicleLoadEvent``, if applicable. Provide the session ID if this status event corresponds to an active charging session. This allows associating discrete status snapshots with session-based energy flow data.

get · iOS 27.0+

id

TypeScript
get id(): string
Swift declaration
let id: UUID

The unique identifier of the status event.

get · iOS 27.0+

energy

TypeScript
get energy(): _Foundation_Measurement<_Foundation_UnitEnergy>
Swift declaration
let energy: Measurement<UnitEnergy>

State of charge in milli-watt-hours [mWh] at time of status event

get · iOS 27.0+

status

TypeScript
get status(): ElectricVehicleStatusEvent_Status
Swift declaration
let status: ElectricVehicleStatusEvent.Status

The current status of the vehicle relative to charger connection

get · iOS 27.0+

venueID

TypeScript
get venueID(): string
Swift declaration
let venueID: UUID

The identifier of the venue where this event occurred.

get · iOS 27.0+

deviceID

TypeScript
get deviceID(): string
Swift declaration
let deviceID: String

The device's unique stable identifier.

get · iOS 27.0+

timestamp

TypeScript
get timestamp(): globalThis.Date
Swift declaration
let timestamp: Date

The timestamp for when the status event occurred.

init · iOS 27.0+

init

TypeScript
static init(timestamp: globalThis.Date, device: ElectricalLoadDevice, venueID: string, status: ElectricVehicleStatusEvent_Status, stateOfCharge: number, energy: _Foundation_Measurement<_Foundation_UnitEnergy>, estimatedRange?: (_Foundation_Measurement<_Foundation_UnitLength>) | null, chargingTarget?: (ElectricVehicleStatusEvent_ChargingTarget) | null, sessionIdentifier?: (string) | null): ElectricVehicleStatusEvent
Swift declaration
init(timestamp: Date, device: ElectricalLoadDevice, venueID: UUID, status: ElectricVehicleStatusEvent.Status, stateOfCharge: Int, energy: Measurement<UnitEnergy>, estimatedRange: Measurement<UnitLength>? = nil, chargingTarget: ElectricVehicleStatusEvent.ChargingTarget? = nil, sessionIdentifier: UUID? = nil)

Creates a status event for an electric vehicle. - Parameters: - timestamp: The time when the status event occurred. - device: The electrical load device. - venueID: The identifier of the venue where this event occurred. - status: The current status of the vehicle relative to its charger connection. - stateOfCharge: The remaining battery capacity as a percentage (0–100). - energy: The state of charge in milli-watt-hours. - estimatedRange: The estimated driving range, or `nil` if unavailable. - chargingTarget: Target information for the charging session, or `nil` if unavailable. - sessionIdentifier: The session identifier from the associated ``ElectricVehicleLoadEvent``, or `nil`.

Skipped declarations

No declarations were skipped in this snapshot.

All EnergyKit types →