TogglesTrait.ToggleSetting

class TogglesTrait.ToggleSetting : ClusterStruct


Indicates if a specific toggle is enabled or not.

Summary

Nested types

Descriptor enum for this struct's fields.

Public constructors

ToggleSetting(toggleName: String, enabled: Boolean)

Creates the ToggleSetting 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 if the toggle is enabled or not.

String

The internal name of the toggle.

Public constructors

ToggleSetting

ToggleSetting(toggleName: String = "", enabled: Boolean = false)

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

enabled

val enabledBoolean

Indicates if the toggle is enabled or not.

toggleName

val toggleNameString

The internal name of the toggle.