struct ForecastStructIndicates a list of slots to describe the overall timing of the ESA’s planned energy and
power usage, with different power and energy demands for each slot. For example, slots might
be used to describe the distinct stages of a washing machine cycle.
-
Indicates which element of the
Slotslist is currently active in the forecast sequence. A null value indicates that the sequence has not yet started.Declaration
Swift
let activeSlotNumber: UInt16? -
The planned start time, in UTC, for the entire forecast.
Declaration
Swift
let startTime: UInt32 -
The planned end time, in UTC, for the entire forecast.
Declaration
Swift
let endTime: UInt32 -
The earliest time, in UTC, that the ESA can start the forecast sequence.
Declaration
Swift
let earliestStartTime: UInt32? -
The latest end time, in UTC, for the entire forecast.
Declaration
Swift
let latestEndTime: UInt32? -
A list of
SlotStructswhere the list must contain at least one entry but no more than 10.Declaration
Swift
let slots: [Matter.DeviceEnergyManagementTrait.SlotStruct] -
The reason for updating the forecast.
Declaration
Swift
let forecastUpdateReason: Matter.DeviceEnergyManagementTrait.ForecastUpdateReasonEnum -
Creates a new Struct instance using data read from the given
TraitDecoder.Throws
HomeError.parseErrorwhen parsing fails.Declaration
Swift
init(decoder: TraitDecoder) throwsParameters
decoderThe raw data representing this Struct.
-
Writes this Struct to the given
TraitEncoder. ThrowsHomeError.parseErrorif the data could not be encoded.Declaration
Swift
func encode(with encoder: TraitEncoder) throws -
Returns the field corresponding to the given field ID.
Declaration
Swift
static func structField(id: UInt32) -> (any Field)?