ThermostatTrait.PresetStruct

class ThermostatTrait.PresetStruct : ClusterStruct


A preset.

Summary

Public constructors

PresetStruct(
    presetHandle: ByteArray?,
    presetScenario: ThermostatTrait.PresetScenarioEnum,
    name: OptionalValue<String?>,
    coolingSetpoint: OptionalValue<Short>,
    heatingSetpoint: OptionalValue<Short>,
    builtIn: Boolean?
)

Creates the PresetStruct class.

Public functions

open StructDescriptor

Returns the descriptor for the struct.

open Any?

Returns the value of the field for the given tag ID.

Public properties

Boolean?

Indicates whether the preset is built-in, meaning that it can be modified but not deleted.

OptionalValue<Short>

The cooling setpoint for the preset.

OptionalValue<Short>

The heating setpoint for the preset.

OptionalValue<String?>

A user-provided name.

ByteArray?

A device generated identifier for this preset.

ThermostatTrait.PresetScenarioEnum

The associated PresetScenarioEnum value for this preset.

Public constructors

PresetStruct

PresetStruct(
    presetHandle: ByteArray? = null,
    presetScenario: ThermostatTrait.PresetScenarioEnum = PresetScenarioEnum.Occupied,
    name: OptionalValue<String?> = OptionalValue.absent(),
    coolingSetpoint: OptionalValue<Short> = OptionalValue.absent(),
    heatingSetpoint: OptionalValue<Short> = OptionalValue.absent(),
    builtIn: Boolean? = null
)

Creates the PresetStruct class.

Public functions

getDescriptor

open fun getDescriptor(): StructDescriptor

Returns the descriptor for the struct.

getFieldValueById

open fun getFieldValueById(tagId: UInt): Any?

Returns the value of the field for the given tag ID.

Public properties

builtIn

val builtInBoolean?

Indicates whether the preset is built-in, meaning that it can be modified but not deleted.

coolingSetpoint

val coolingSetpointOptionalValue<Short>

The cooling setpoint for the preset.

heatingSetpoint

val heatingSetpointOptionalValue<Short>

The heating setpoint for the preset.

name

val nameOptionalValue<String?>

A user-provided name.

presetHandle

val presetHandleByteArray?

A device generated identifier for this preset.

presetScenario

val presetScenarioThermostatTrait.PresetScenarioEnum

The associated PresetScenarioEnum value for this preset.