EstimatedSavings

struct EstimatedSavings

Estimated savings accrued over a period of time, relative to a comparison scenario.

  • Returns the field corresponding to the given field ID.

    Declaration

    Swift

    static func structField(id: UInt32) -> (any Field)?
  • The estimated savings. Positive values mean the structure spent less than it would have under the comparison scenario; negative values mean it spent more. The scenarios behind this estimate are reported in EnergyScenarioAnalysisEvent.

    Declaration

    Swift

    let value: Money?
  • Start of the period over which savings are accrued, represented as midnight (00:00:00) UTC on the start date.

    Declaration

    Swift

    let startTime: Date?
  • Duration of the period in days.

    Declaration

    Swift

    let durationDays: Int32?
  • Creates a new Struct instance using data read from the given TraitDecoder.

    Throws

    HomeError.parseError when parsing fails.

    Declaration

    Swift

    init(decoder: TraitDecoder) throws

    Parameters

    decoder

    The raw data representing this Struct.

  • Writes this Struct to the given TraitEncoder. Throws HomeError.parseError if the data could not be encoded.

    Declaration

    Swift

    func encode(with encoder: TraitEncoder) throws