ModeSelect

interface ModeSelect : ModeSelectTrait.Attributes, MatterTrait, Updatable, ModeSelectCommands


API for the ModeSelect trait. This trait provides an interface for controlling a characteristic of a device that can be set to one of several predefined values.

Summary

Nested types

Descriptor enum for this trait's attributes.

Descriptor enum for this trait's commands.

Public functions

Boolean
Boolean

Public properties

open TraitFactory<ModeSelect>

Inherited functions

From com.google.home.matter.standard.ModeSelectCommands
suspend Unit
changeToMode(newMode: UByte)

Change the mode of the device's cluster instance, and set the currentMode attribute of the device's cluster instance.

From com.google.home.TraitStateInvalidation
suspend Unit
From com.google.home.Updatable
suspend ModeSelect
update(optimisticReturn: (ModeSelect) -> Unit, init: ModeSelectTrait.MutableAttributes.() -> Unit)

Creates a mutable copy of an object and calls the given function to mutate it, then saves it and returns a new immutable copy with the updated state.

Inherited properties

From com.google.home.matter.standard.ModeSelectTrait.Attributes
List<UInt>

A list of client-generated commands which are supported by this cluster server instance.

List<UInt>

A list of the attribute IDs of the attributes supported by the cluster instance.

UShort

The revision of the server cluster specification supported by the cluster instance.

UByte?

The current mode of a cluster instance on a device.

String?

Describes the purpose of the mode in this cluster instance.

ModeSelectTrait.Feature

Whether the server supports zero or more optional cluster features.

List<UInt>

A list of server-generated commands (server to client) which are supported by this cluster server instance.

UByte?

The value of the currentMode that depends on the state of an OnOff cluster on the same endpoint.

UShort?

The single standard namespace for any standard semantic tag value supported in this or any other cluster instance with the same namespace.

UByte?

The desired startup mode for the device when it is supplied with power.

List<ModeSelectTrait.ModeOptionStruct>?

The list of supported modes for the cluster instance.

From com.google.home.Trait

Public functions

supports

fun supports(attribute: ModeSelect.Attribute): Boolean

supports

fun supports(command: ModeSelect.Command): Boolean

Public properties

factory

open val factoryTraitFactory<ModeSelect>