OpenCloseCommands

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

Known direct subclasses
OpenClose

API for the OpenClose trait.


Summary

Public functions

suspend Unit

Fully close the device.

BatchableCommand<Unit>

The batchable version of close command.

suspend Unit
goToOpenPercentage(
    openPercent: Double,
    openDirection: OpenCloseTrait.Direction
)

Open the device to a specific percentage, where 0 is closed and 100 is fully open.

BatchableCommand<Unit>
goToOpenPercentageBatchable(
    openPercent: Double,
    openDirection: OpenCloseTrait.Direction
)

The batchable version of goToOpenPercentage command.

suspend Unit

Fully open the device.

BatchableCommand<Unit>

The batchable version of open command.

suspend Unit
step(
    openRelativePercent: Double,
    openDirection: OpenCloseTrait.Direction
)

Adjust the open-close state of the device relative to the current state.

BatchableCommand<Unit>
stepBatchable(
    openRelativePercent: Double,
    openDirection: OpenCloseTrait.Direction
)

The batchable version of step command.

Public functions

close

suspend fun close(): Unit

Fully close the device.

closeBatchable

fun closeBatchable(): BatchableCommand<Unit>

The batchable version of close command.

Fully close the device.

Returns
BatchableCommand<Unit>

BatchableCommand

goToOpenPercentage

suspend fun goToOpenPercentage(
    openPercent: Double,
    openDirection: OpenCloseTrait.Direction
): Unit

Open the device to a specific percentage, where 0 is closed and 100 is fully open.

Parameters
openPercent: Double

Indicates the percentage that a device should be opened, where 0 is closed and 100 is fully open.

openDirection: OpenCloseTrait.Direction

The direction in which to open. Only present if the device supports multiple directions, as indicated by the OpenCloseTrait.Attributes.openDirection attribute, and a direction is specified by the user.

goToOpenPercentageBatchable

fun goToOpenPercentageBatchable(
    openPercent: Double,
    openDirection: OpenCloseTrait.Direction
): BatchableCommand<Unit>

The batchable version of goToOpenPercentage command.

Open the device to a specific percentage, where 0 is closed and 100 is fully open.

Parameters
openPercent: Double

Indicates the percentage that a device should be opened, where 0 is closed and 100 is fully open.

openDirection: OpenCloseTrait.Direction

The direction in which to open. Only present if the device supports multiple directions, as indicated by the OpenCloseTrait.Attributes.openDirection attribute, and a direction is specified by the user.

Returns
BatchableCommand<Unit>

BatchableCommand

open

suspend fun open(openDirection: OpenCloseTrait.Direction): Unit

Fully open the device.

Parameters
openDirection: OpenCloseTrait.Direction

The direction in which to open. Only present if the device supports multiple directions, as indicated by the OpenCloseTrait.Attributes.openDirection attribute, and a direction is specified by the user.

openBatchable

fun openBatchable(openDirection: OpenCloseTrait.Direction): BatchableCommand<Unit>

The batchable version of open command.

Fully open the device.

Parameters
openDirection: OpenCloseTrait.Direction

The direction in which to open. Only present if the device supports multiple directions, as indicated by the OpenCloseTrait.Attributes.openDirection attribute, and a direction is specified by the user.

Returns
BatchableCommand<Unit>

BatchableCommand

step

suspend fun step(
    openRelativePercent: Double,
    openDirection: OpenCloseTrait.Direction
): Unit

Adjust the open-close state of the device relative to the current state.

Parameters
openRelativePercent: Double

The exact percentage to change open-close state.

openDirection: OpenCloseTrait.Direction

The direction in which to open. Only present if the device supports multiple directions, as indicated by the OpenCloseTrait.Attributes.openDirection attribute, and a direction is specified by the user.

stepBatchable

fun stepBatchable(
    openRelativePercent: Double,
    openDirection: OpenCloseTrait.Direction
): BatchableCommand<Unit>

The batchable version of step command.

Adjust the open-close state of the device relative to the current state.

Parameters
openRelativePercent: Double

The exact percentage to change open-close state.

openDirection: OpenCloseTrait.Direction

The direction in which to open. Only present if the device supports multiple directions, as indicated by the OpenCloseTrait.Attributes.openDirection attribute, and a direction is specified by the user.

Returns
BatchableCommand<Unit>

BatchableCommand