Contents

runtimeInsights(forDeviceID:using:atVenue:)

Returns records that provide insight into runtime of a given device.

Declaration

final func runtimeInsights(forDeviceID deviceID: String, using query: ElectricityInsightQuery, atVenue energyVenueID: UUID) async throws -> AsyncStream<ElectricityInsightRecord<Duration>>

Parameters

Return Value

An AsyncStream of ElectricityInsightRecords containing Duration values for a given device.

Discussion

The system throws EnergyKitError.venueUnavailable if a person provides an invalid EnergyVenue identifier. If another request is in progress, the system throwsEnergyKitError.inProgress.

See Also

Getting device insights