CookTrait.FoodPreset

class CookTrait.FoodPreset : ClusterStruct


Internal name of the food preset. This name can be non-user-friendly, and is shared across all languages.

Summary

Nested types

Descriptor enum for this struct's fields.

Public constructors

FoodPreset(
    foodPresetName: String,
    supportedUnits: List<CookTrait.Unit>,
    foodSynonyms: List<CookTrait.FoodSynonym>
)

Creates the FoodPreset 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

String

Synonyms for the preset, which should include both singular and plural forms, if applicable.

List<CookTrait.FoodSynonym>

Food name synonyms for the preset in each supported language.

List<CookTrait.Unit>

Contains all of the units supported by the device for a specific food.

Public constructors

FoodPreset

FoodPreset(
    foodPresetName: String = "",
    supportedUnits: List<CookTrait.Unit> = emptyList(),
    foodSynonyms: List<CookTrait.FoodSynonym> = emptyList()
)

Creates the FoodPreset class.

Public functions

getDescriptor

@HomeExperimentalGenericApi
open fun getDescriptor(): StructDescriptor

Returns the descriptor for the struct.

getFieldValueById

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

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

Public properties

foodPresetName

val foodPresetNameString

Synonyms for the preset, which should include both singular and plural forms, if applicable.

foodSynonyms

val foodSynonymsList<CookTrait.FoodSynonym>

Food name synonyms for the preset in each supported language.

supportedUnits

val supportedUnitsList<CookTrait.Unit>

Contains all of the units supported by the device for a specific food.