# ClosureControl

# ClosureControl


```
@Generated(value = ["GoogleHomePlatformCodegen"])
interface ClosureControl : ClosureControlTrait.Attributes, MatterTrait, ClosureControlCommands
```

<br />

*** ** * ** ***

API for the ClosureControl trait. This trait provides an interface for controlling a closure.

## Summary

| ### Nested types |
|---|
| `enum https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureControl.Attribute : https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-enum/index.html, https://developers.home.google.com/reference/kotlin/com/google/home/Field` Descriptor enum for this trait's attributes. |
| `enum https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureControl.Command : https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-enum/index.html` Descriptor enum for this trait's commands. |
| `class https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureControl.EngageStateChangedEvent : https://developers.home.google.com/reference/kotlin/com/google/home/Event, https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureControlTrait.EngageStateChanged` |
| `enum https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureControl.EngageStateChangedEvent.EventFields : https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-enum/index.html, https://developers.home.google.com/reference/kotlin/com/google/home/Field` Descriptor enum for this event's fields. |
| `class https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureControl.MovementCompletedEvent : https://developers.home.google.com/reference/kotlin/com/google/home/Event, https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureControlTrait.MovementCompleted` |
| `enum https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureControl.MovementCompletedEvent.EventFields : https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-enum/index.html, https://developers.home.google.com/reference/kotlin/com/google/home/Field` Descriptor enum for this event's fields. |
| `class https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureControl.OperationalErrorEvent : https://developers.home.google.com/reference/kotlin/com/google/home/Event, https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureControlTrait.OperationalError` |
| `enum https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureControl.OperationalErrorEvent.EventFields : https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-enum/index.html, https://developers.home.google.com/reference/kotlin/com/google/home/Field` Descriptor enum for this event's fields. |
| `class https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureControl.SecureStateChangedEvent : https://developers.home.google.com/reference/kotlin/com/google/home/Event, https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureControlTrait.SecureStateChanged` |
| `enum https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureControl.SecureStateChangedEvent.EventFields : https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-enum/index.html, https://developers.home.google.com/reference/kotlin/com/google/home/Field` Descriptor enum for this event's fields. |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureControl#supports(com.google.home.matter.standard.ClosureControl.Attribute)(attribute: https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureControl.Attribute)` |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureControl#supports(com.google.home.matter.standard.ClosureControl.Command)(command: https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureControl.Command)` |

| ### Public properties |
|---|---|
| `open https://developers.home.google.com/reference/kotlin/com/google/home/TraitFactory<https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureControl>` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureControl#factory()` |

| ### Inherited functions |
|---|
| From [com.google.home.matter.standard.ClosureControlCommands](https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureControlCommands) |---|---| | `suspend https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureControlCommands#calibrate()()` Initiates a calibration of the closure. | | `https://developers.home.google.com/reference/kotlin/com/google/home/BatchableCommand<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html>` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureControlCommands#calibrateBatchable()()` The batchable version of `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureControlCommands#calibrate()` command. | | `suspend https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureControlCommands#moveTo(kotlin.Function1)(optionalArgs: https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureControlTrait.MoveToCommand.OptionalArgs.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)` The closure updates its position, latch state and motion speed. | | `https://developers.home.google.com/reference/kotlin/com/google/home/BatchableCommand<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html>` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureControlCommands#moveToBatchable(kotlin.Function1)(optionalArgs: https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureControlTrait.MoveToCommand.OptionalArgs.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)` The batchable version of `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureControlCommands#moveTo(kotlin.Function1)` command. | | `suspend https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureControlCommands#stop()()` Stops the closure. | | `https://developers.home.google.com/reference/kotlin/com/google/home/BatchableCommand<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html>` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureControlCommands#stopBatchable()()` The batchable version of `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureControlCommands#stop()` command. | |
| From [com.google.home.matter.standard.ClosureControlTrait.Attributes](https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureControlTrait.Attributes) |---|---| | `open https://developers.home.google.com/reference/kotlin/com/google/home/StructDescriptor` | `@https://developers.home.google.com/reference/kotlin/com/google/home/annotation/HomeExperimentalGenericApi https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureControlTrait.Attributes#getDescriptor()()` Returns the descriptor for the struct. | | `open https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html?` | `@https://developers.home.google.com/reference/kotlin/com/google/home/annotation/HomeExperimentalGenericApi https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureControlTrait.Attributes#getFieldValueById(kotlin.UInt)(tagId: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html)` Returns the value of the field for the given tag ID. | |
| From [com.google.home.TraitStateInvalidation](https://developers.home.google.com/reference/kotlin/com/google/home/TraitStateInvalidation) |---|---| | `suspend https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/TraitStateInvalidation#forceRead()()` | |

| ### Inherited properties |
|---|
| From [com.google.home.matter.standard.ClosureControlTrait.Attributes](https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureControlTrait.Attributes) |---|---| | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html>` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureControlTrait.Attributes#acceptedCommandList()` A list of client-generated commands which are supported by this cluster server instance. | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html>` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureControlTrait.Attributes#attributeList()` A list of the attribute IDs of the attributes supported by the cluster instance. | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-short/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureControlTrait.Attributes#clusterRevision()` The revision of the server cluster specification supported by the cluster instance. | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureControlTrait.Attributes#countdownTime()` The estimated time remaining, in seconds, before the operation is complete. | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html<https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureControlTrait.ClosureErrorEnum>?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureControlTrait.Attributes#currentErrorList()` A list of active errors. | | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureControlTrait.Feature` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureControlTrait.Attributes#featureMap()` Whether the server supports zero or more optional cluster features. | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html>` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureControlTrait.Attributes#generatedCommandList()` A list of server-generated commands (server to client) which are supported by this cluster server instance. | | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureControlTrait.LatchControlModesBitmap?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureControlTrait.Attributes#latchControlModes()` Whether the latch mechanism can be latched or unlatched remotely. | | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureControlTrait.MainStateEnum?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureControlTrait.Attributes#mainState()` The current operational state of the closure. | | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureControlTrait.OverallCurrentStateStruct?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureControlTrait.Attributes#overallCurrentState()` The current `Position`, `Latch`, and `Speed` states, whichever are applicable based on the feature flags set. | | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureControlTrait.OverallTargetStateStruct?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureControlTrait.Attributes#overallTargetState()` The `TargetPosition`, `TargetLatch`, `TargetSpeed` values, whichever are applicable according to the feature flags set. | |
| From [com.google.home.Trait](https://developers.home.google.com/reference/kotlin/com/google/home/Trait) |---|---| | `https://developers.home.google.com/reference/kotlin/com/google/home/Trait.TraitMetadata` | `https://developers.home.google.com/reference/kotlin/com/google/home/Trait#metadata()` | |

## Public functions

### supports

```
fun supports(attribute: ClosureControl.Attribute): Boolean
```

### supports

```
fun supports(command: ClosureControl.Command): Boolean
```

## Public properties

### factory

```
open val factory: TraitFactory<ClosureControl>
```