struct EnergyScenarioAnalysisTraitStores and evaluates monthly energy savings simulations.
-
The trait identifier.
Declaration
Swift
static let identifier: String -
List of all event types on the given Trait.
Currently, only
MatterTraittraits support any events, but this will likely expand to other traits in the future.Declaration
Swift
static let supportedEventTypes: [any Event.Type] -
List of all commands supported by the Trait’s definition. The commands supported by a specific Trait instance may vary.
Declaration
Swift
static var supportedCommandTypes: [any Command.Type] { get } -
Metadata about this
Trait.Declaration
Swift
let metadata: TraitMetadata -
Creates a new Trait instance using data read from the given
TraitDecoder.Throws
HomeError.parseErrorwhen parsing fails.Declaration
Swift
init(decoder: TraitDecoder, interactionProxy: (any InteractionProxy)?, metadata: TraitMetadata) throwsParameters
decoderThe raw data representing this Trait.
interactionProxyProxy to the Interaction Client.
metadataMetadata about this Trait.
-
Writes this object to the given
TraitEncoder. ThrowsHomeError.encodingFailedif the data could not be encoded.Declaration
Swift
func encode(with encoder: TraitEncoder) throws -
Returns a Boolean value indicating whether two values are equal.
Equality is the inverse of inequality. For any values
aandb,a == bimplies thata != bisfalse.Declaration
Parameters
lhsA value to compare.
rhsAnother value to compare.
-
Hashes the essential components of this value by feeding them into the given hasher.
Implement this method to conform to the
Hashableprotocol. The components used for hashing must be the same as the components compared in your type’s==operator implementation. Callhasher.combine(_:)with each of these components.Important
In your implementation of
hash(into:), don’t callfinalize()on thehasherinstance provided, or replace it with a different instance. Doing so may become a compile-time error in the future.Declaration
Swift
func hash(into hasher: inout Hasher) -
Estimated savings accrued over a period of time, relative to a comparison scenario.
Declaration
Swift
struct EstimatedSavings -
Identifies the model used to generate a simulation input series.
Declaration
Swift
struct ModelInfo -
Overrides for heating and cooling targets.
Declaration
Swift
struct TargetOverrides -
Changes to a specific device’s settings.
Declaration
Swift
struct DeviceSettingsChanges -
A scenario to be simulated.
Declaration
Swift
struct Scenario -
Aggregated runtime for a specific HVAC runtime type.
Declaration
Swift
struct AggregatedRuntime -
Results of a scenario simulation.
Declaration
Swift
struct ScenarioResult -
Summary of an energy tariff.
Declaration
Swift
struct EnergyTariffSnapshot -
Summary of an HVAC system size.
Declaration
Swift
struct HvacSystemSizeSnapshot -
How the data for a simulation input series is generated.
Declaration
Swift
enum ModelType -
Pre-defined simulation scenarios. These could be deduced from the specification, but an enum makes them easier for a client to look up.
Declaration
Swift
enum StandardScenarioType -
How the results are aggregated over time.
Declaration
Swift
enum AggregationType -
The length of each entry in a savings time series.
Declaration
Swift
enum TimeSeriesGranularity -
Command to read a time series of estimated savings for this structure over a requested window. The series is assembled from stored analysis events rather than from this trait, so it can span many periods and extend into the future, where the trait holds only a running total to date.
Declaration
Swift
func getSavingsTimeSeries(startTime: Date? = nil, durationDays: Int32? = nil) async throws -> Google.EnergyScenarioAnalysisTrait.GetSavingsTimeSeriesCommandResponseParameters
startTimeStart of the requested window, represented as midnight (00:00:00) UTC on the start date. The response is bounded by how much analysis history has been retained, so it may begin later than this.
durationDaysLength of the requested window in days. The window may extend into the future to request projected savings.
-
Event containing simulation results and assumptions.
Declaration
Swift
struct EnergyScenarioAnalysisEvent