VolumeCommands

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

Known direct subclasses
Volume

API for the Volume trait.


Summary

Public functions

suspend Unit
moveToVolume(volumePercent: UByte)

Move the volume of the device to the specified volume.

BatchableCommand<Unit>
moveToVolumeBatchable(volumePercent: UByte)

The batchable version of moveToVolume command.

suspend Unit

Mutes the device.

BatchableCommand<Unit>

The batchable version of mute command.

suspend Unit

Unmutes the device and sets the volume to the last non-zero volume.

BatchableCommand<Unit>

The batchable version of unmute command.

suspend Unit

Incremental step volume.

BatchableCommand<Unit>
volumeStepBatchable(
    stepMode: VolumeTrait.VolumeStepModeEnum,
    step: UByte
)

The batchable version of volumeStep command.

Public functions

moveToVolume

suspend fun moveToVolume(volumePercent: UByte): Unit

Move the volume of the device to the specified volume.

Parameters
volumePercent: UByte

The desired volume percentage setting in the range of 0 to 100.

moveToVolumeBatchable

fun moveToVolumeBatchable(volumePercent: UByte): BatchableCommand<Unit>

The batchable version of moveToVolume command.

Move the volume of the device to the specified volume.

Parameters
volumePercent: UByte

The desired volume percentage setting in the range of 0 to 100.

Returns
BatchableCommand<Unit>

BatchableCommand

mute

suspend fun mute(): Unit

Mutes the device.

muteBatchable

fun muteBatchable(): BatchableCommand<Unit>

The batchable version of mute command.

Mutes the device.

Returns
BatchableCommand<Unit>

BatchableCommand

unmute

suspend fun unmute(): Unit

Unmutes the device and sets the volume to the last non-zero volume.

unmuteBatchable

fun unmuteBatchable(): BatchableCommand<Unit>

The batchable version of unmute command.

Unmutes the device and sets the volume to the last non-zero volume.

Returns
BatchableCommand<Unit>

BatchableCommand

volumeStep

suspend fun volumeStep(stepMode: VolumeTrait.VolumeStepModeEnum, step: UByte): Unit

Incremental step volume. If volume + step is greater than 100, the volume is set to 100. If volume + step is less than 0, the volume is set to 0.

Parameters
stepMode: VolumeTrait.VolumeStepModeEnum

Indicates whether to increase or decrease the volume.

step: UByte

Indicates the increment by which to increase or decrease the volume. Valid values are between 0 and 100.

volumeStepBatchable

fun volumeStepBatchable(
    stepMode: VolumeTrait.VolumeStepModeEnum,
    step: UByte
): BatchableCommand<Unit>

The batchable version of volumeStep command.

Incremental step volume. If volume + step is greater than 100, the volume is set to 100. If volume + step is less than 0, the volume is set to 0.

Parameters
stepMode: VolumeTrait.VolumeStepModeEnum

Indicates whether to increase or decrease the volume.

step: UByte

Indicates the increment by which to increase or decrease the volume. Valid values are between 0 and 100.

Returns
BatchableCommand<Unit>

BatchableCommand