Rotation

@Generated(value = ["GoogleHomePlatformCodegen"])
interface Rotation : RotationTrait.Attributes, MatterTrait, RotationCommands


API for the Rotation trait. This trait belongs to devices that support rotation, which can be specified in percentage of a full rotation or in number of degrees. The default direction of a rotation is clockwise.

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

Inherited functions

From com.google.home.google.RotationCommands
suspend Unit
rotateToDegrees(rotationDegrees: Float)

Sets the absolute rotation in degrees.

BatchableCommand<Unit>
rotateToDegreesBatchable(rotationDegrees: Float)

The batchable version of rotateToDegrees command.

suspend Unit
rotateToPercentage(rotationPercent: Float)

Sets the absolute rotation in percentage.

BatchableCommand<Unit>

The batchable version of rotateToPercentage command.

From com.google.home.TraitStateInvalidation
suspend Unit

Inherited properties

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

RotationTrait.RotationFeature

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.

Float?

The number of degreees that the device is currently rotated in the clockwise direction.

RotationTrait.RotationDegreesRange?

The number of degrees that a device is permitted to rotate.

Float?

The percentage that the device is currently rotated in the clockwise direction.

Float?

The intended percentage of the device's clockwise rotation as the result of an ongoing change in rotation.

From com.google.home.Trait

Public functions

supports

fun supports(attribute: Rotation.Attribute): Boolean

supports

fun supports(command: Rotation.Command): Boolean

Public properties

factory

open val factoryTraitFactory<Rotation>