A measurement of the electricity consumed by an HVAC system.
Submit events representing electricity consumption
to provide insights about electricity usage and their
managed devices’ adherence to ``ElectricityGuidance``. These events,
called ``ElectricHVACLoadEvent``s are data points recorded at specific points in time for a given
``EnergyVenue`` that allow the venue to determine when the device used electricity
and its cleanliness based on historical `ElectricityGuidance`. Additionally,
relative cost can be determined using the rate plan at the `EnergyVenue`, if available.
You can submit ``ElectricHVACLoadEvent``s as your managed devices consume
electricity. You can request insights based on submitted ``ElectricHVACLoadEvent``s .
Insights are only available upon your submission of ``ElectricHVACLoadEvent``s .
### Submit ElectricHVACLoadEvent
Save data to the ``ElectricHVACLoadEvent`` with a sampling rate
that's proportional to the rate of change of electrical
quantities such a heating or cooling stage, or relative power.
Generally, one sample every 15 minutes (at 0, 15, 30, and 45-minute marks)
is sufficient when the device's session is active and no significant changes occur to its power state.
Significant changes may include:
* A person initiated an action.
* A pause in power consumption such as going idle.
* The heating or cooling stage changed.
Idle devices between heating or cooling cycles don’t generate events.
The device that requested ``ElectricityGuidance`` must submit the corresponding
load events.
Load events for an ``EnergyVenue`` are accessible to all people that use the Home app.
Members (8)
get · iOS 27.0+
deviceName
TypeScript
get deviceName(): string
Swift declaration
var deviceName: String { get }
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 26.0+
measurement
TypeScript
get measurement(): ElectricHVACLoadEvent_ElectricalMeasurement
Swift declaration
let measurement: ElectricHVACLoadEvent.ElectricalMeasurement
The electricity consumption of a device.
get · iOS 26.0+
id
TypeScript
get id(): string
Swift declaration
let id: UUID
The unique identifier of the electrical load event.
get · iOS 26.0+
session
TypeScript
get session(): ElectricHVACLoadEvent_Session
Swift declaration
let session: ElectricHVACLoadEvent.Session
The session information.
An HVAC system between its cooling or heating cycles can be idling
and load events must not be generated
get · iOS 26.0+
deviceID
TypeScript
get deviceID(): string
Swift declaration
let deviceID: String
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.
Creates an electric HVAC load event.
- Parameters:
- timestamp: The timestamp for when the event occurred.
- measurement: The electricity consumption of a device.
- session: The session information
- device: The electrical load device that generated this event.
Creates an ``ElectricHVACLoadEvent``
- Parameters:
- timestamp: The timestamp for when the event occurred.
- measurement: The electricity consumption of a device.
- session: The session information
- deviceID: The device's unique stable identifier.
- Throws: ``EnergyKit.invalidDeviceID``