Switch

interface Switch : SwitchTrait.Attributes, MatterTrait


API for the Switch trait. This trait exposes interactions with a switch device, for the purpose of using those interactions by other devices.

Summary

Nested types

Descriptor enum for this trait's attributes.

Public functions

Boolean

Public properties

open TraitFactory<Switch>

Inherited functions

From com.google.home.TraitStateInvalidation
suspend Unit

Inherited properties

From com.google.home.matter.standard.SwitchTrait.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 position of the switch.

SwitchTrait.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 maximum number of consecutive presses that can be detected and reported by a momentary switch which supports multi-press.

UByte?

The maximum number of positions the switch has.

From com.google.home.Trait

Public functions

supports

fun supports(attribute: Switch.Attribute): Boolean

Public properties

factory

open val factoryTraitFactory<Switch>