CookTrait.CookCommand.Request

class CookTrait.CookCommand.Request : ClusterStruct


The request payload for the Cook command.

Summary

Nested types

Descriptor enum for this command's request fields.

Public constructors

Request(
    start: Boolean,
    cookingMode: CookTrait.CookingMode,
    foodPreset: String,
    quantity: Float,
    unit: CookTrait.Unit
)

Creates a request payload for the Cook command.

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

CookTrait.CookingMode

Cooking mode for the device, as indicated by the currentCookingMode attribute.

String

The food preset requested by the user, as indicated by the currentFoodPreset attribute.

Float

Quantity of the food requested by the user.

Boolean

If set to true, start cooking, if false, stop current cooking mode.

CookTrait.Unit

Unit associated with the quantity, as indicated by the currentFoodUnit attribute.

Public constructors

Request

Request(
    start: Boolean = false,
    cookingMode: CookTrait.CookingMode = CookingMode.UnknownCookingMode,
    foodPreset: String = "",
    quantity: Float = 0.0f,
    unit: CookTrait.Unit = Unit.UnknownUnits
)

Creates a request payload for the Cook command.

Public functions

getDescriptor

@HomeExperimentalApi
open fun getDescriptor(): StructDescriptor

Returns the descriptor for the struct.

getFieldValueById

@HomeExperimentalApi
open fun getFieldValueById(tagId: UInt): Any?

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

Public properties

cookingMode

val cookingModeCookTrait.CookingMode

Cooking mode for the device, as indicated by the currentCookingMode attribute.

foodPreset

val foodPresetString

The food preset requested by the user, as indicated by the currentFoodPreset attribute.

quantity

val quantityFloat

Quantity of the food requested by the user.

start

val startBoolean

If set to true, start cooking, if false, stop current cooking mode.

unit

val unitCookTrait.Unit

Unit associated with the quantity, as indicated by the currentFoodUnit attribute.