Toggles

@Generated(value = ["GoogleHomePlatformCodegen"])
interface Toggles : TogglesTrait.Attributes, MatterTrait, TogglesCommands


API for the Toggles trait. This trait belongs to any devices with settings that can only exist in one of two states and provides an interface to a toggle switch that can be turned on or off.

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<Toggles>

Inherited functions

From com.google.home.google.TogglesCommands
suspend Unit
changeToggleSettings(
    updatedToggleSettings: List<TogglesTrait.ToggleSetting>
)

Changes the state of one or more toggles.

BatchableCommand<Unit>

The batchable version of changeToggleSettings command.

From com.google.home.TraitStateInvalidation
suspend Unit

Inherited properties

From com.google.home.google.TogglesTrait.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.

List<TogglesTrait.ToggleSetting>?

The current state of each toggle that is available on the device.

UInt

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.

List<TogglesTrait.Toggle>?

The list of available toggles.

From com.google.home.Trait

Public functions

supports

fun supports(attribute: Toggles.Attribute): Boolean

supports

fun supports(command: Toggles.Command): Boolean

Public properties

factory

open val factoryTraitFactory<Toggles>