Contents

submitEvents(_:)

Submits electrical load events to be used by EnergyKit to generate energy insights.

Declaration

func submitEvents<Event>(_ events: [Event]) async throws where Event : ElectricalLoadEventProtocol

Parameters

Discussion

The submission may contain events for multiple devices. The system throws EnergyKitError.invalidLoadEvent if a load event is submitted for an incorrect EnergyVenue or if it’s submitted by an iPhone, iPad, or Mac that didn’t fetch the corresponding ElectricityGuidance.