One Logo Pool Ball
EnergyKit · IOS API REFERENCE

ElectricalLoadDevice

struct · iOS 27.0+ · SDK 27.1

struct ElectricalLoadDevice

Represents an electrical load device for event submission. Provides a unified way to identify devices across ``ElectricVehicleLoadEvent``, ``ElectricHVACLoadEvent``, and ``ElectricVehicleStatusEvent``.

Members (4)

init · iOS 27.0+

init

TypeScript
static init(id: string, name: string, type: ElectricalLoadDevice_DeviceType): ElectricalLoadDevice
Swift declaration
init(id: String, name: String, type: ElectricalLoadDevice.DeviceType)

Creates an electrical load device. - Parameters: - id: The device's unique stable identifier. The max length is `64 UTF-8` bytes. UUID strings are permitted. The following are enforced as preconditions: - Isn't empty, and less than or equal to 64 UTF-8 bytes. - Uses only alphanumeric, space, hyphen, and apostrophe characters. - Starts and ends with an alphanumeric character. - name: 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. - type: The type of electrical load device.

get · iOS 27.0+

id

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

The device identifier.

get · iOS 27.0+

name

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

The device name. 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+

type

TypeScript
get type(): ElectricalLoadDevice_DeviceType
Swift declaration
let type: ElectricalLoadDevice.DeviceType

The type of electrical load device.

Skipped declarations

No declarations were skipped in this snapshot.

All EnergyKit types →