struct PresetInformation about a preset.
-
The internal handle of the temperature preset that is used in commands and states. This handle can be non-user-friendly, and it is shared across all languages.
Declaration
Swift
let presetHandle: String -
The type of this preset, which determines which icon will be used to represent this preset on touch surfaces.
Declaration
Swift
let presetScenario: Google.ExtendedThermostatTrait.PresetScenario -
The maximum number of seconds this preset can be held. A setting of
-1means there is is no limit on the hold duration. If unset, holding this preset is not supported.Declaration
Swift
let presetMaxHoldSeconds: Int32 -
Synonyms for the preset in each supported language.
Declaration
Swift
let names: [Google.ExtendedThermostatTrait.PresetSynonyms] -
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)?