LevelControlCommands

@Generated(value = ["GoogleHomePlatformCodegen"])
interface LevelControlCommands

LevelControl

API for the LevelControl trait.


Summary

Public functions

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.

BatchableCommand<Unit>
moveBatchable(
    moveMode: LevelControlTrait.MoveModeEnum,
    rate: UByte?,
    optionsMask: LevelControlTrait.OptionsBitmap,
    optionsOverride: LevelControlTrait.OptionsBitmap
)

The batchable version of move command.

suspend Unit

Change a device's current frequency.

BatchableCommand<Unit>

The batchable version of moveToClosestFrequency command.

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

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

BatchableCommand<Unit>
moveToLevelBatchable(
    level: UByte,
    transitionTime: UShort?,
    optionsMask: LevelControlTrait.OptionsBitmap,
    optionsOverride: LevelControlTrait.OptionsBitmap
)

The batchable version of moveToLevel command.

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.

BatchableCommand<Unit>
moveToLevelWithOnOffBatchable(
    level: UByte,
    transitionTime: UShort?,
    optionsMask: LevelControlTrait.OptionsBitmap,
    optionsOverride: LevelControlTrait.OptionsBitmap
)

The batchable version of moveToLevelWithOnOff command.

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.

BatchableCommand<Unit>
moveWithOnOffBatchable(
    moveMode: LevelControlTrait.MoveModeEnum,
    rate: UByte?,
    optionsMask: LevelControlTrait.OptionsBitmap,
    optionsOverride: LevelControlTrait.OptionsBitmap
)

The batchable version of moveWithOnOff command.

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.

BatchableCommand<Unit>
stepBatchable(
    stepMode: LevelControlTrait.StepModeEnum,
    stepSize: UByte,
    transitionTime: UShort?,
    optionsMask: LevelControlTrait.OptionsBitmap,
    optionsOverride: LevelControlTrait.OptionsBitmap
)

The batchable version of step command.

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.

BatchableCommand<Unit>
stepWithOnOffBatchable(
    stepMode: LevelControlTrait.StepModeEnum,
    stepSize: UByte,
    transitionTime: UShort?,
    optionsMask: LevelControlTrait.OptionsBitmap,
    optionsOverride: LevelControlTrait.OptionsBitmap
)

The batchable version of stepWithOnOff command.

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.

BatchableCommand<Unit>
stopBatchable(
    optionsMask: LevelControlTrait.OptionsBitmap,
    optionsOverride: LevelControlTrait.OptionsBitmap
)

The batchable version of stop command.

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.

BatchableCommand<Unit>

The batchable version of stopWithOnOff command.

Public functions

move

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

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

Parameters
moveMode: LevelControlTrait.MoveModeEnum

The direction in which to move the level. This must be one of the values in LevelControlTrait.MoveModeEnum.

rate: UByte?

The rate (in units per seconds) used to move the device's currentLevel to the minLevel or maxLevel.

optionsMask: LevelControlTrait.OptionsBitmap

Determines which bits in the options attribute should be overridden by optionsOverride.

optionsOverride: LevelControlTrait.OptionsBitmap

If the corresponding bit in optionsMask is set to 1, the bit set here overrides the corresponding bit in options attribute.

moveBatchable

fun moveBatchable(
    moveMode: LevelControlTrait.MoveModeEnum,
    rate: UByte?,
    optionsMask: LevelControlTrait.OptionsBitmap,
    optionsOverride: LevelControlTrait.OptionsBitmap
): BatchableCommand<Unit>

The batchable version of move command.

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

Parameters
moveMode: LevelControlTrait.MoveModeEnum

The direction in which to move the level. This must be one of the values in LevelControlTrait.MoveModeEnum.

rate: UByte?

The rate (in units per seconds) used to move the device's currentLevel to the minLevel or maxLevel.

optionsMask: LevelControlTrait.OptionsBitmap

Determines which bits in the options attribute should be overridden by optionsOverride.

optionsOverride: LevelControlTrait.OptionsBitmap

If the corresponding bit in optionsMask is set to 1, the bit set here overrides the corresponding bit in options attribute.

Returns
BatchableCommand<Unit>

BatchableCommand

moveToClosestFrequency

suspend fun moveToClosestFrequency(frequency: UShort): Unit

Change a device's current frequency.

Parameters
frequency: UShort

The frequency to change the currentFrequency to.

moveToClosestFrequencyBatchable

fun moveToClosestFrequencyBatchable(frequency: UShort): BatchableCommand<Unit>

The batchable version of moveToClosestFrequency command.

Change a device's current frequency.

Parameters
frequency: UShort

The frequency to change the currentFrequency to.

Returns
BatchableCommand<Unit>

BatchableCommand

moveToLevel

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

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

Parameters
level: UByte

The level to move the device to.

transitionTime: UShort?

The time (in 0.1 seconds) taken to move the device to the new level.

optionsMask: LevelControlTrait.OptionsBitmap

Determines which bits in the options attribute should be overridden by optionsOverride.

optionsOverride: LevelControlTrait.OptionsBitmap

If the corresponding bit in optionsMask is set to 1, the bit set here overrides the corresponding bit in options attribute.

moveToLevelBatchable

fun moveToLevelBatchable(
    level: UByte,
    transitionTime: UShort?,
    optionsMask: LevelControlTrait.OptionsBitmap,
    optionsOverride: LevelControlTrait.OptionsBitmap
): BatchableCommand<Unit>

The batchable version of moveToLevel command.

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

Parameters
level: UByte

The level to move the device to.

transitionTime: UShort?

The time (in 0.1 seconds) taken to move the device to the new level.

optionsMask: LevelControlTrait.OptionsBitmap

Determines which bits in the options attribute should be overridden by optionsOverride.

optionsOverride: LevelControlTrait.OptionsBitmap

If the corresponding bit in optionsMask is set to 1, the bit set here overrides the corresponding bit in options attribute.

Returns
BatchableCommand<Unit>

BatchableCommand

moveToLevelWithOnOff

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

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.

If this command sets the currentLevel above the minLevel, the onOff attribute is set to true.

If this command sets the currentLevel to the minLevel, the onOff attribute is set to false.

Parameters
level: UByte

The level to move the device to.

transitionTime: UShort?

The time (in 0.1 seconds) taken to move the device to the new level.

optionsMask: LevelControlTrait.OptionsBitmap

Determines which bits in the options attribute should be overridden by optionsOverride.

optionsOverride: LevelControlTrait.OptionsBitmap

If the corresponding bit in optionsMask is set to 1, the bit set here overrides the corresponding bit in options attribute.

moveToLevelWithOnOffBatchable

fun moveToLevelWithOnOffBatchable(
    level: UByte,
    transitionTime: UShort?,
    optionsMask: LevelControlTrait.OptionsBitmap,
    optionsOverride: LevelControlTrait.OptionsBitmap
): BatchableCommand<Unit>

The batchable version of moveToLevelWithOnOff command.

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.

If this command sets the currentLevel above the minLevel, the onOff attribute is set to true.

If this command sets the currentLevel to the minLevel, the onOff attribute is set to false.

Parameters
level: UByte

The level to move the device to.

transitionTime: UShort?

The time (in 0.1 seconds) taken to move the device to the new level.

optionsMask: LevelControlTrait.OptionsBitmap

Determines which bits in the options attribute should be overridden by optionsOverride.

optionsOverride: LevelControlTrait.OptionsBitmap

If the corresponding bit in optionsMask is set to 1, the bit set here overrides the corresponding bit in options attribute.

Returns
BatchableCommand<Unit>

BatchableCommand

moveWithOnOff

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

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.

If this command sets the currentLevel above the minLevel, the onOff attribute is set to true.

If this command sets the currentLevel to the minLevel, the onOff attribute is set to false.

Parameters
moveMode: LevelControlTrait.MoveModeEnum

The direction in which to move the level. This must be one of the values in LevelControlTrait.MoveModeEnum.

rate: UByte?

The rate (in units per seconds) used to move the device's currentLevel to the minLevel or maxLevel.

optionsMask: LevelControlTrait.OptionsBitmap

Determines which bits in the options attribute should be overridden by optionsOverride.

optionsOverride: LevelControlTrait.OptionsBitmap

If the corresponding bit in optionsMask is set to 1, the bit set here overrides the corresponding bit in options attribute.

moveWithOnOffBatchable

fun moveWithOnOffBatchable(
    moveMode: LevelControlTrait.MoveModeEnum,
    rate: UByte?,
    optionsMask: LevelControlTrait.OptionsBitmap,
    optionsOverride: LevelControlTrait.OptionsBitmap
): BatchableCommand<Unit>

The batchable version of moveWithOnOff command.

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.

If this command sets the currentLevel above the minLevel, the onOff attribute is set to true.

If this command sets the currentLevel to the minLevel, the onOff attribute is set to false.

Parameters
moveMode: LevelControlTrait.MoveModeEnum

The direction in which to move the level. This must be one of the values in LevelControlTrait.MoveModeEnum.

rate: UByte?

The rate (in units per seconds) used to move the device's currentLevel to the minLevel or maxLevel.

optionsMask: LevelControlTrait.OptionsBitmap

Determines which bits in the options attribute should be overridden by optionsOverride.

optionsOverride: LevelControlTrait.OptionsBitmap

If the corresponding bit in optionsMask is set to 1, the bit set here overrides the corresponding bit in options attribute.

Returns
BatchableCommand<Unit>

BatchableCommand

step

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

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

If the stepSize used results in a currentLevel that is greater than the maxLevel or less than the minLevel, then the command stops when the currentLevel reaches the maxLevel or minLevel, respectively.

The command may complete in a shorter time than specified for transitionTime if the maxLevel or minLevel is reached before the transition time is over.

Parameters
stepMode: LevelControlTrait.StepModeEnum

The direction in which to move the level. This must be one of the values in LevelControlTrait.StepModeEnum.

stepSize: UByte

The amount of units to move the device's currentLevel to.

transitionTime: UShort?

The time (in 0.1 seconds) taken to move the device to the new level.

optionsMask: LevelControlTrait.OptionsBitmap

Determines which bits in the options attribute should be overridden by optionsOverride.

optionsOverride: LevelControlTrait.OptionsBitmap

If the corresponding bit in optionsMask is set to 1, the bit set here overrides the corresponding bit in options attribute.

stepBatchable

fun stepBatchable(
    stepMode: LevelControlTrait.StepModeEnum,
    stepSize: UByte,
    transitionTime: UShort?,
    optionsMask: LevelControlTrait.OptionsBitmap,
    optionsOverride: LevelControlTrait.OptionsBitmap
): BatchableCommand<Unit>

The batchable version of step command.

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

If the stepSize used results in a currentLevel that is greater than the maxLevel or less than the minLevel, then the command stops when the currentLevel reaches the maxLevel or minLevel, respectively.

The command may complete in a shorter time than specified for transitionTime if the maxLevel or minLevel is reached before the transition time is over.

Parameters
stepMode: LevelControlTrait.StepModeEnum

The direction in which to move the level. This must be one of the values in LevelControlTrait.StepModeEnum.

stepSize: UByte

The amount of units to move the device's currentLevel to.

transitionTime: UShort?

The time (in 0.1 seconds) taken to move the device to the new level.

optionsMask: LevelControlTrait.OptionsBitmap

Determines which bits in the options attribute should be overridden by optionsOverride.

optionsOverride: LevelControlTrait.OptionsBitmap

If the corresponding bit in optionsMask is set to 1, the bit set here overrides the corresponding bit in options attribute.

Returns
BatchableCommand<Unit>

BatchableCommand

stepWithOnOff

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

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.

If the stepSize used results in a currentLevel that is greater than the maxLevel or less than the minLevel, then the command stops when the currentLevel reaches the maxLevel or minLevel, respectively.

The command may complete in a shorter time than specified for transitionTime if the maxLevel or minLevel is reached before the transition time is over.

If this command sets the currentLevel above the minLevel, the onOff attribute is set to true.

If this command sets the currentLevel to the minLevel, the onOff attribute is set to false.

Parameters
stepMode: LevelControlTrait.StepModeEnum

The direction in which to move the level. This must be one of the values in LevelControlTrait.StepModeEnum.

stepSize: UByte

The amount of units to move the device's currentLevel to.

transitionTime: UShort?

The time (in 0.1 seconds) taken to move the device to the new level.

optionsMask: LevelControlTrait.OptionsBitmap

Determines which bits in the options attribute should be overridden by optionsOverride.

optionsOverride: LevelControlTrait.OptionsBitmap

If the corresponding bit in optionsMask is set to 1, the bit set here overrides the corresponding bit in options attribute.

stepWithOnOffBatchable

fun stepWithOnOffBatchable(
    stepMode: LevelControlTrait.StepModeEnum,
    stepSize: UByte,
    transitionTime: UShort?,
    optionsMask: LevelControlTrait.OptionsBitmap,
    optionsOverride: LevelControlTrait.OptionsBitmap
): BatchableCommand<Unit>

The batchable version of stepWithOnOff command.

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.

If the stepSize used results in a currentLevel that is greater than the maxLevel or less than the minLevel, then the command stops when the currentLevel reaches the maxLevel or minLevel, respectively.

The command may complete in a shorter time than specified for transitionTime if the maxLevel or minLevel is reached before the transition time is over.

If this command sets the currentLevel above the minLevel, the onOff attribute is set to true.

If this command sets the currentLevel to the minLevel, the onOff attribute is set to false.

Parameters
stepMode: LevelControlTrait.StepModeEnum

The direction in which to move the level. This must be one of the values in LevelControlTrait.StepModeEnum.

stepSize: UByte

The amount of units to move the device's currentLevel to.

transitionTime: UShort?

The time (in 0.1 seconds) taken to move the device to the new level.

optionsMask: LevelControlTrait.OptionsBitmap

Determines which bits in the options attribute should be overridden by optionsOverride.

optionsOverride: LevelControlTrait.OptionsBitmap

If the corresponding bit in optionsMask is set to 1, the bit set here overrides the corresponding bit in options attribute.

Returns
BatchableCommand<Unit>

BatchableCommand

stop

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

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

This command and StopWithOnOff are identical.

Parameters
optionsMask: LevelControlTrait.OptionsBitmap

Determines which bits in the options attribute should be overridden by optionsOverride.

optionsOverride: LevelControlTrait.OptionsBitmap

If the corresponding bit in optionsMask is set to 1, the bit set here overrides the corresponding bit in options attribute.

stopBatchable

fun stopBatchable(
    optionsMask: LevelControlTrait.OptionsBitmap,
    optionsOverride: LevelControlTrait.OptionsBitmap
): BatchableCommand<Unit>

The batchable version of stop command.

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

This command and StopWithOnOff are identical.

Parameters
optionsMask: LevelControlTrait.OptionsBitmap

Determines which bits in the options attribute should be overridden by optionsOverride.

optionsOverride: LevelControlTrait.OptionsBitmap

If the corresponding bit in optionsMask is set to 1, the bit set here overrides the corresponding bit in options attribute.

Returns
BatchableCommand<Unit>

BatchableCommand

stopWithOnOff

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

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

This command and Stop are identical.

Parameters
optionsMask: LevelControlTrait.OptionsBitmap

Determines which bits in the options attribute should be overridden by optionsOverride.

optionsOverride: LevelControlTrait.OptionsBitmap

If the corresponding bit in optionsMask is set to 1, the bit set here overrides the corresponding bit in options attribute.

stopWithOnOffBatchable

fun stopWithOnOffBatchable(
    optionsMask: LevelControlTrait.OptionsBitmap,
    optionsOverride: LevelControlTrait.OptionsBitmap
): BatchableCommand<Unit>

The batchable version of stopWithOnOff command.

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

This command and Stop are identical.

Parameters
optionsMask: LevelControlTrait.OptionsBitmap

Determines which bits in the options attribute should be overridden by optionsOverride.

optionsOverride: LevelControlTrait.OptionsBitmap

If the corresponding bit in optionsMask is set to 1, the bit set here overrides the corresponding bit in options attribute.

Returns
BatchableCommand<Unit>

BatchableCommand