# FanControl


```
@Generated(value = ["GoogleHomePlatformCodegen"])
interface FanControl : FanControlTrait.Attributes, MatterTrait, Updatable, FanControlCommands
```

<br />

*** ** * ** ***

API for the FanControl trait. This trait provides an interface for controlling the speed of a fan.

## Summary

| ### Nested types |
|---|
| `enum https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/FanControl.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/FanControl.Command : https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-enum/index.html` Descriptor enum for this trait's commands. |

| ### 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/FanControl#supports(com.google.home.matter.standard.FanControl.Attribute)(attribute: https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/FanControl.Attribute)` |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/FanControl#supports(com.google.home.matter.standard.FanControl.Command)(command: https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/FanControl.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/FanControl>` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/FanControl#factory()` |

| ### Inherited functions |
|---|
| From [com.google.home.matter.standard.FanControlCommands](https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/FanControlCommands) |---|---| | `suspend https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/FanControlCommands#step(com.google.home.matter.standard.FanControlTrait.StepDirectionEnum,kotlin.Function1)( direction: https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/FanControlTrait.StepDirectionEnum, optionalArgs: https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/FanControlTrait.StepCommand.OptionalArgs.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html )` Speed up or slow down the fan, in steps, without the client having to know the fan 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/FanControlCommands#stepBatchable(com.google.home.matter.standard.FanControlTrait.StepDirectionEnum,kotlin.Function1)( direction: https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/FanControlTrait.StepDirectionEnum, optionalArgs: https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/FanControlTrait.StepCommand.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/FanControlCommands#step(com.google.home.matter.standard.FanControlTrait.StepDirectionEnum,kotlin.Function1)` command. | |
| From [com.google.home.matter.standard.FanControlTrait.Attributes](https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/FanControlTrait.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/FanControlTrait.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/FanControlTrait.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()()` | |
| 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/FanControl` | `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/FanControl) -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html, init: https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/FanControlTrait.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. | |

| ### Inherited properties |
|---|
| From [com.google.home.matter.standard.FanControlTrait.Attributes](https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/FanControlTrait.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/FanControlTrait.Attributes#acceptedCommandList()` A list of client-generated commands which are supported by this cluster server instance. | | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/FanControlTrait.AirflowDirectionEnum?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/FanControlTrait.Attributes#airflowDirection()` Indicates the current airflow direction of the fan. | | `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/FanControlTrait.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/FanControlTrait.Attributes#clusterRevision()` The revision of the server cluster specification supported by the cluster instance. | | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/FanControlTrait.FanModeEnum?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/FanControlTrait.Attributes#fanMode()` The current speed mode of the fan. | | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/FanControlTrait.FanModeSequenceEnum?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/FanControlTrait.Attributes#fanModeSequence()` The supported fan speed ranges. | | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/FanControlTrait.Feature` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/FanControlTrait.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/FanControlTrait.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/FanControlTrait.Attributes#percentCurrent()` The actual currently operating fan speed, or `0` to indicate that the fan is off. | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-byte/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/FanControlTrait.Attributes#percentSetting()` The speed setting for the fan. | | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/FanControlTrait.RockBitmap?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/FanControlTrait.Attributes#rockSetting()` A bitmap that indicates the current active fan rocking motion settings. | | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/FanControlTrait.RockBitmap?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/FanControlTrait.Attributes#rockSupport()` A bitmap that indicates what rocking motions the server supports. | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-byte/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/FanControlTrait.Attributes#speedCurrent()` The actual currently operating fan speed, or `0` to indicate that the fan is off. | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-byte/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/FanControlTrait.Attributes#speedMax()` The fan speed (value of `1`) or the maximum speed, if the fan is capable of multiple speeds, | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-byte/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/FanControlTrait.Attributes#speedSetting()` The speed setting for the fan. | | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/FanControlTrait.WindBitmap?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/FanControlTrait.Attributes#windSetting()` A bitmap that indicates the current active fan wind feature settings. | | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/FanControlTrait.WindBitmap?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/FanControlTrait.Attributes#windSupport()` A bitmap that indicates what wind modes the server supports. | |
| 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: FanControl.Attribute): Boolean
```

### supports

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

## Public properties

### factory

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