LevelControl

interface LevelControl : LevelControlTrait.Attributes, MatterTrait, Updatable, LevelControlCommands


API for the LevelControl trait. This trait provides an interface for controlling a characteristic of a device that can be set to a level.

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

Inherited functions

From com.google.home.matter.standard.LevelControlCommands
suspend Unit
move(
    moveMode: LevelControlTrait.MoveModeEnum,
    rate: UByte?,
    optionsMask: LevelControlTrait.OptionsBitmap,
    optionsOverride: LevelControlTrait.OptionsBitmap
)

Change a device's level based on a rate of movement.

suspend Unit

Change a device's current frequency.

suspend Unit
moveToLevel(
    level: UByte,
    transitionTime: UShort?,
    optionsMask: LevelControlTrait.OptionsBitmap,
    optionsOverride: LevelControlTrait.OptionsBitmap
)

Move a device from its current level to the provided level.

suspend Unit
moveToLevelWithOnOff(
    level: UByte,
    transitionTime: UShort?,
    optionsMask: LevelControlTrait.OptionsBitmap,
    optionsOverride: LevelControlTrait.OptionsBitmap
)

Move a device from its current level to the provided level and toggle the onOff attribute of the OnOff cluster depending on the end value of currentLevel.

suspend Unit
moveWithOnOff(
    moveMode: LevelControlTrait.MoveModeEnum,
    rate: UByte?,
    optionsMask: LevelControlTrait.OptionsBitmap,
    optionsOverride: LevelControlTrait.OptionsBitmap
)

Move a device's level based on a rate of movement and toggle the onOff attribute of the OnOff cluster depending on the end value of currentLevel.

suspend Unit
step(
    stepMode: LevelControlTrait.StepModeEnum,
    stepSize: UByte,
    transitionTime: UShort?,
    optionsMask: LevelControlTrait.OptionsBitmap,
    optionsOverride: LevelControlTrait.OptionsBitmap
)

Move a device's level a specific amount over a period of time.

suspend Unit
stepWithOnOff(
    stepMode: LevelControlTrait.StepModeEnum,
    stepSize: UByte,
    transitionTime: UShort?,
    optionsMask: LevelControlTrait.OptionsBitmap,
    optionsOverride: LevelControlTrait.OptionsBitmap
)

Move a device's level a specific amount over a period of time and toggle the onOff attribute of the OnOff cluster depending on the end value of currentLevel.

suspend Unit
stop(
    optionsMask: LevelControlTrait.OptionsBitmap,
    optionsOverride: LevelControlTrait.OptionsBitmap
)

Terminate a Move, MoveToLevel, or Step command (including their OnOff variants) currently in progress, and sets the remainingTime attribute to 0.

suspend Unit
stopWithOnOff(
    optionsMask: LevelControlTrait.OptionsBitmap,
    optionsOverride: LevelControlTrait.OptionsBitmap
)

Terminate a Move, MoveToLevel, or Step command (including their OnOff variants) currently in progress, and sets the remainingTime attribute to 0.

From com.google.home.TraitStateInvalidation
suspend Unit
From com.google.home.Updatable
suspend LevelControl
update(optimisticReturn: (LevelControl) -> Unit, init: LevelControlTrait.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.LevelControlTrait.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.

UShort?

The frequency at which the device is at currentLevel.

UByte?

The current level of the device, which is device dependent.

UByte?

The movement rate (in units per second) when a move command is reeceived with a rate parameter of null.

LevelControlTrait.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.

UShort?

The maximum value that can be assigned to the currentFrequency attribute.

UByte?

The maximum value that can be assigned to the currentLevel attribute.

UShort?

The minimum value that can be assigned to the currentFrequency attribute.

UByte?

The minimum value that can be assigned to the currentLevel attribute.

UShort?

The time taken (in 0.1 seconds) to move the currentLevel from the maxLevel to the minLevel when an on command is received by an OnOff cluster on the same endpoint.

UByte?

The value that the currentLevel attribute is set to when the onOff attribute of the OnOff cluster is set to true as a result of processing an OnOff cluster command.

UShort?

The time taken (in 0.1 seconds) to move to or from the target level when on or off commands are received by an OnOff cluster on the same endpoint.

UShort?

The time taken (in 0.1 seconds) to move the currentLevel from the minLevel to the maxLevel when an on command is received by an OnOff cluster on the same endpoint.

LevelControlTrait.OptionsBitmap?

A bitmap that determines the default behavior of some cluster commands.

UShort?

The time remaining (in 0.1 seconds) until the current command is complete.

UByte?

The desired startup level for a device when it is supplied with power, which is reflected in the currentLevel attribute.

From com.google.home.Trait

Public functions

supports

fun supports(attribute: LevelControl.Attribute): Boolean

supports

fun supports(command: LevelControl.Command): Boolean

Public properties

factory

open val factoryTraitFactory<LevelControl>