PresetStruct

struct PresetStruct

A preset.

  • A device generated identifier for this preset.

    Declaration

    Swift

    let presetHandle: Data?
  • The associated PresetScenarioEnum value for this preset.

    Declaration

    Swift

    let presetScenario: Matter.ThermostatTrait.PresetScenarioEnum
  • A user-provided name.

    Declaration

    Swift

    let name: String?
  • The cooling setpoint for the preset.

    Declaration

    Swift

    let coolingSetpoint: Int16?
  • The heating setpoint for the preset.

    Declaration

    Swift

    let heatingSetpoint: Int16?
  • Indicates whether the preset is built-in, meaning that it can be modified but not deleted.

    Declaration

    Swift

    let builtIn: Bool?
  • 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
  • Returns the field corresponding to the given field ID.

    Declaration

    Swift

    static func structField(id: UInt32) -> (any Field)?