Represents an electrical load device for event submission.
Provides a unified way to identify devices across
``ElectricVehicleLoadEvent``, ``ElectricHVACLoadEvent``,
and ``ElectricVehicleStatusEvent``.
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.