OpenClose

@Generated(value = ["GoogleHomePlatformCodegen"])
interface OpenClose : OpenCloseTrait.Attributes, MatterTrait, OpenCloseCommands


API for the OpenClose trait. This trait belongs to devices that support opening and closing, and in some cases opening and closing partially or potentially in more than one direction.

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

Inherited functions

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

From com.google.home.TraitStateInvalidation
suspend Unit

Inherited properties

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

OpenCloseTrait.OpenCloseFeature

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.

Double?

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

List<OpenCloseTrait.DirectionOpenState>?

The list of states for each supported open direction.

List<OpenCloseTrait.Direction>?
Double?
From com.google.home.Trait

Public functions

supports

fun supports(attribute: OpenClose.Attribute): Boolean

supports

fun supports(command: OpenClose.Command): Boolean

Public properties

factory

open val factoryTraitFactory<OpenClose>