DispenseTrait.DispensableItem

class DispenseTrait.DispensableItem : ClusterStruct


The available dispensible items.

Summary

Nested types

Descriptor enum for this struct's fields.

Public constructors

DispensableItem(
    itemName: String,
    itemNameSynonyms: List<DispenseTrait.ItemNameSynonym>,
    supportedUnits: List<DispenseTrait.Unit>,
    defaultPortion: DispenseTrait.Amount
)

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

DispenseTrait.Amount

Typical amount of the item that may be dispensed.

String

Internal name for the dispensed item.

List<DispenseTrait.ItemNameSynonym>

Synonym names for the dispensed item in each supported language.

List<DispenseTrait.Unit>

Set of units the device supports for that item.

Public constructors

DispensableItem

DispensableItem(
    itemName: String = "",
    itemNameSynonyms: List<DispenseTrait.ItemNameSynonym> = emptyList(),
    supportedUnits: List<DispenseTrait.Unit> = emptyList(),
    defaultPortion: DispenseTrait.Amount = Amount()
)

Creates the DispensableItem class.

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

defaultPortion

val defaultPortionDispenseTrait.Amount

Typical amount of the item that may be dispensed.

itemName

val itemNameString

Internal name for the dispensed item. This can be non-user-friendly, and is shared across all languages.

itemNameSynonyms

val itemNameSynonymsList<DispenseTrait.ItemNameSynonym>

Synonym names for the dispensed item in each supported language.

supportedUnits

val supportedUnitsList<DispenseTrait.Unit>

Set of units the device supports for that item.