# ValveConfigurationAndControl

# ValveConfigurationAndControl


```
@Generated(value = ["GoogleHomePlatformCodegen"])
interface ValveConfigurationAndControl : ValveConfigurationAndControlTrait.Attributes, MatterTrait, Updatable, ValveConfigurationAndControlCommands
```

<br />

*** ** * ** ***

API for the ValveConfigurationAndControl trait. This trait provides an interface for configuring a valve.

## Summary

| ### Nested types |
|---|
| `enum https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ValveConfigurationAndControl.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/ValveConfigurationAndControl.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/ValveConfigurationAndControl.ValveFaultEvent : https://developers.home.google.com/reference/kotlin/com/google/home/Event, https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ValveConfigurationAndControlTrait.ValveFault` |
| `enum https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ValveConfigurationAndControl.ValveFaultEvent.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/ValveConfigurationAndControl.ValveStateChangedEvent : https://developers.home.google.com/reference/kotlin/com/google/home/Event, https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ValveConfigurationAndControlTrait.ValveStateChanged` |
| `enum https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ValveConfigurationAndControl.ValveStateChangedEvent.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/ValveConfigurationAndControl#supports(com.google.home.matter.standard.ValveConfigurationAndControl.Attribute)(attribute: https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ValveConfigurationAndControl.Attribute)` |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ValveConfigurationAndControl#supports(com.google.home.matter.standard.ValveConfigurationAndControl.Command)(command: https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ValveConfigurationAndControl.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/ValveConfigurationAndControl>` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ValveConfigurationAndControl#factory()` |

| ### Inherited functions |
|---|
| 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()()` | |
| From [com.google.home.Updatable](https://developers.home.google.com/reference/kotlin/com/google/home/Updatable) |---|---| | `suspend https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ValveConfigurationAndControl` | `https://developers.home.google.com/reference/kotlin/com/google/home/Updatable#update(kotlin.Function1,kotlin.Function1)( optimisticReturn: (https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ValveConfigurationAndControl) -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html, init: https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ValveConfigurationAndControlTrait.MutableAttributes.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html )` Creates a mutable copy of an object and calls the given function to mutate it, then saves it and returns a new immutable copy with the updated state. | |
| From [com.google.home.matter.standard.ValveConfigurationAndControlCommands](https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ValveConfigurationAndControlCommands) |---|---| | `suspend https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ValveConfigurationAndControlCommands#close()()` Set the valve to its closed position. | | `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/ValveConfigurationAndControlCommands#closeBatchable()()` The batchable version of `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ValveConfigurationAndControlCommands#close()` 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/ValveConfigurationAndControlCommands#open(kotlin.Function1)(optionalArgs: https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ValveConfigurationAndControlTrait.OpenCommand.OptionalArgs.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)` Set the valve to its open position. | | `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/ValveConfigurationAndControlCommands#openBatchable(kotlin.Function1)(optionalArgs: https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ValveConfigurationAndControlTrait.OpenCommand.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/ValveConfigurationAndControlCommands#open(kotlin.Function1)` command. | |
| From [com.google.home.matter.standard.ValveConfigurationAndControlTrait.Attributes](https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ValveConfigurationAndControlTrait.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/ValveConfigurationAndControlTrait.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/ValveConfigurationAndControlTrait.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. | |

| ### Inherited properties |
|---|
| 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()` | |
| From [com.google.home.matter.standard.ValveConfigurationAndControlTrait.Attributes](https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ValveConfigurationAndControlTrait.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/ValveConfigurationAndControlTrait.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/ValveConfigurationAndControlTrait.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-long/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ValveConfigurationAndControlTrait.Attributes#autoCloseTime()` The UTC time when the valve will close, depending on value of the `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ValveConfigurationAndControlTrait.Attributes#openDuration()` attribute. | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-short/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ValveConfigurationAndControlTrait.Attributes#clusterRevision()` The revision of the server cluster specification supported by the cluster instance. | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-byte/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ValveConfigurationAndControlTrait.Attributes#currentLevel()` The current level of the valve as a percentage value, between fully closed and fully open. | | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ValveConfigurationAndControlTrait.ValveStateEnum?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ValveConfigurationAndControlTrait.Attributes#currentState()` The current state of the valve. | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ValveConfigurationAndControlTrait.Attributes#defaultOpenDuration()` The default duration, in seconds, for which the valve will remain open, if a value for the `openDuration` parameter is not present in the `Open` command. | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-byte/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ValveConfigurationAndControlTrait.Attributes#defaultOpenLevel()` The default value used for the `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ValveConfigurationAndControlTrait.Attributes#targetLevel()` attribute, when a valve transitions from the closed to the open state, caused by an `Open` command, if a value for the `targetLevel` parameter isn't present in the `Open` command. | | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ValveConfigurationAndControlTrait.Feature` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ValveConfigurationAndControlTrait.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/ValveConfigurationAndControlTrait.Attributes#generatedCommandList()` A list of server-generated commands (server to client) which are supported by this cluster server instance. | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-byte/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ValveConfigurationAndControlTrait.Attributes#levelStep()` The step size supported by the valve. | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ValveConfigurationAndControlTrait.Attributes#openDuration()` The total duration, in seconds, for which the valve will remain open for the current opening. | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ValveConfigurationAndControlTrait.Attributes#remainingDuration()` The remaining duration, in seconds, until the valve closes. | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-byte/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ValveConfigurationAndControlTrait.Attributes#targetLevel()` The target level of the valve as a percentage value, between fully closed and fully open. | | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ValveConfigurationAndControlTrait.ValveStateEnum?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ValveConfigurationAndControlTrait.Attributes#targetState()` The target state, while changing the state, of the valve. | | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ValveConfigurationAndControlTrait.ValveFaultBitmap?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ValveConfigurationAndControlTrait.Attributes#valveFault()` Any faults registered by the valve. | |

## Public functions

### supports

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

### supports

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

## Public properties

### factory

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