    struct LevelControlTrait

This trait provides an interface for controlling a characteristic of a device that can be set to
a level.
- `


  ### [supportedEventTypes](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait#/s:15GoogleHomeTypes6MatterO17LevelControlTraitV014supportedEventC0Say0aB3SDK0I0_pXpGvpZ)


  ` No supported events for `LevelControlTrait`.

  #### Declaration

  Swift

      static let supportedEventTypes: [any Event.Type]

- `


  ### [supportedCommandTypes](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait#/s:15GoogleHomeTypes6MatterO17LevelControlTraitV016supportedCommandC0Say0aB3SDK0I0_pXpGvpZ)


  ` List of the commands that are supported by `LevelControlTrait`.

  #### Declaration

  Swift

      static let supportedCommandTypes: [any Command.Type]

- `


  ### [identifier](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait#/s:15GoogleHomeTypes6MatterO17LevelControlTraitV10identifierSSvpZ)


  ` The trait identifier.

  #### Declaration

  Swift

      static let identifier: String

- `


  ### [metadata](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait#/s:15GoogleHomeTypes6MatterO17LevelControlTraitV8metadata0aB3SDK0G8MetadataVvp)


  ` Metadata about this `Trait`.

  #### Declaration

  Swift

      let metadata: TraitMetadata

- `


  ### [attributes](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait#/s:15GoogleHomeTypes6MatterO17LevelControlTraitV10attributesAE10AttributesVvp)


  ` List of attributes for the `LevelControlTrait`.

  #### Declaration

  Swift

      let attributes: https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.LevelControlTrait.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/Attributes.html

- `


  ### [init(decoder:interactionProxy:metadata:)](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait#/s:15GoogleHomeTypes6MatterO17LevelControlTraitV7decoder16interactionProxy8metadataAE0aB3SDK0G7DecoderV_AI011InteractionJ0_pSgAI0G8MetadataVtKcfc)


  ` Creates a new Trait instance using data read from the given `TraitDecoder`.
  Throws
  `HomeError.parseError` when parsing fails.

  #### Declaration

  Swift

      init(decoder: TraitDecoder, interactionProxy: (any InteractionProxy)?, metadata: TraitMetadata) throws

  #### Parameters

  |---|---|
  | ` decoder ` | The raw data representing this Trait. |
  | ` interactionProxy ` | Proxy to the Interaction Client. |
  | ` metadata ` | Metadata about this Trait. |

- `


  ### [encode(with:)](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait#/s:15GoogleHomeTypes6MatterO17LevelControlTraitV6encode4withy0aB3SDK0G7EncoderC_tKF)


  ` Writes this object to the given `TraitEncoder`.
  Throws `HomeError.encodingFailed` if the data could not be encoded.

  #### Declaration

  Swift

      func encode(with encoder: TraitEncoder) throws

- `


  ### [forceRead()](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait#/s:15GoogleHomeTypes6MatterO17LevelControlTraitV9forceReadyyYaKF)


  ` This API provides the ability to invalidate state retrieved through subscriptions to the
  target device in the cases where state is not being reported correctly, either intentionally
  (e.g attributes in Matter traits with the "C" quality) or unintentionally due to poor
  implementations.

  When successful, this API will result in a forced read of the convening scope as specified by
  the sub-class and return the result through existing Trait subscriptions if present and
  active.

  This API is to be used sparingly as it can impact the performance and battery life of the
  target device. As such, this API may be throttled by the platform.
  Callers SHALL be prepared to deal with `HomeError`s thrown by this call.

  #### Declaration

  Swift

      func forceRead() async throws

- `


  ### [Attributes](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/Attributes.html)


  ` Attributes for the `https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait.html`.

  #### Declaration

  Swift

      struct Attributes

- `


  ### [==(_:_:)](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait#/s:15GoogleHomeTypes6MatterO17LevelControlTraitV2eeoiySbAE_AEtFZ)


  ` Returns a Boolean value indicating whether two values are equal.

  Equality is the inverse of inequality. For any values `a` and `b`,
  `a == b` implies that `a != b` is `false`.

  #### Declaration

  Swift

      static func == (lhs: https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.LevelControlTrait, rhs: https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.LevelControlTrait) -> Bool

  #### Parameters

  |---|---|
  | ` lhs ` | A value to compare. |
  | ` rhs ` | Another value to compare. |

- `


  ### [hash(into:)](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait#/s:15GoogleHomeTypes6MatterO17LevelControlTraitV4hash4intoys6HasherVz_tF)


  ` Hashes the essential components of this value by feeding them into the
  given hasher.

  Implement this method to conform to the `Hashable` protocol. The
  components used for hashing must be the same as the components compared
  in your type's `==` operator implementation. Call `hasher.combine(_:)`
  with each of these components.
  Important

  In your implementation of `hash(into:)`,
  don't call `finalize()` on the `hasher` instance provided,
  or replace it with a different instance.
  Doing so may become a compile-time error in the future.

  #### Declaration

  Swift

      func hash(into hasher: inout Hasher)

- `


  ### [supportsMoveToLevelCommand](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait#/s:15GoogleHomeTypes6MatterO17LevelControlTraitV014supportsMoveToE7CommandSbvp)


  ` Whether the device supports the `moveToLevel` command for this trait.

  #### Declaration

  Swift

      var supportsMoveToLevelCommand: Bool { get }

- `


  ### [moveToLevel(level:transitionTime:optionsMask:optionsOverride:)](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait#/s:15GoogleHomeTypes6MatterO17LevelControlTraitV06moveToE05level14transitionTime11optionsMask0M8Overrideys5UInt8V_s6UInt16VSgAE13OptionsBitmapVAQtYaKF)


  ` Move a device from its current level to the provided level.

  #### Declaration

  Swift

      func moveToLevel(level: UInt8, transitionTime: UInt16?, optionsMask: https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.LevelControlTrait.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/OptionsBitmap.html, optionsOverride: https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.LevelControlTrait.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/OptionsBitmap.html) async throws

  #### Parameters

  |---|---|
  | ` level ` | The level to move the device to. |
  | ` transitionTime ` | The time (in 0.1 seconds) taken to move the device to the new level. |
  | ` optionsMask ` | Determines which bits in the `https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/Attributes.html#/s:15GoogleHomeTypes6MatterO17LevelControlTraitV10AttributesV7optionsAE13OptionsBitmapVSgvp` attribute should be overridden by `optionsOverride`. |
  | ` optionsOverride ` | If the corresponding bit in `optionsMask` is set to `1`, the bit set here overrides the corresponding bit in `https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/Attributes.html#/s:15GoogleHomeTypes6MatterO17LevelControlTraitV10AttributesV7optionsAE13OptionsBitmapVSgvp` attribute. |

- `


  ### [moveToLevelBatchable(level:transitionTime:optionsMask:optionsOverride:)](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait#/s:15GoogleHomeTypes6MatterO17LevelControlTraitV06moveToE9Batchable5level14transitionTime11optionsMask0N8Override0aB3SDK0J7CommandVyytGs5UInt8V_s6UInt16VSgAE13OptionsBitmapVAUtKF)


  ` The batchable version of moveToLevel command above.
  See also
  moveToLevel

  #### Declaration

  Swift

      func moveToLevelBatchable(level: UInt8, transitionTime: UInt16?, optionsMask: https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.LevelControlTrait.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/OptionsBitmap.html, optionsOverride: https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.LevelControlTrait.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/OptionsBitmap.html) throws -> BatchableCommand<Void>

- `


  ### [supportsMoveCommand](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait#/s:15GoogleHomeTypes6MatterO17LevelControlTraitV19supportsMoveCommandSbvp)


  ` Whether the device supports the `move` command for this trait.

  #### Declaration

  Swift

      var supportsMoveCommand: Bool { get }

- `


  ### [move(moveMode:rate:optionsMask:optionsOverride:)](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait#/s:15GoogleHomeTypes6MatterO17LevelControlTraitV4move0H4Mode4rate11optionsMask0K8OverrideyAE04MoveI4EnumO_s5UInt8VSgAE13OptionsBitmapVAQtYaKF)


  ` Change a device's level based on a rate of movement.

  #### Declaration

  Swift

      func move(moveMode: https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.LevelControlTrait.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/MoveModeEnum.html, rate: UInt8?, optionsMask: https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.LevelControlTrait.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/OptionsBitmap.html, optionsOverride: https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.LevelControlTrait.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/OptionsBitmap.html) async throws

  #### Parameters

  |---|---|
  | ` moveMode ` | The direction in which to move the level. This must be one of the values in \[LevelControlTrait.MoveModeEnum\]. |
  | ` rate ` | The rate (in units per seconds) used to move the device's `currentLevel` to the `https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/Attributes.html#/s:15GoogleHomeTypes6MatterO17LevelControlTraitV10AttributesV03minE0s5UInt8VSgvp` or `https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/Attributes.html#/s:15GoogleHomeTypes6MatterO17LevelControlTraitV10AttributesV03maxE0s5UInt8VSgvp`. |
  | ` optionsMask ` | Determines which bits in the `https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/Attributes.html#/s:15GoogleHomeTypes6MatterO17LevelControlTraitV10AttributesV7optionsAE13OptionsBitmapVSgvp` attribute should be overridden by `optionsOverride`. |
  | ` optionsOverride ` | If the corresponding bit in `optionsMask` is set to `1`, the bit set here overrides the corresponding bit in `https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/Attributes.html#/s:15GoogleHomeTypes6MatterO17LevelControlTraitV10AttributesV7optionsAE13OptionsBitmapVSgvp` attribute. |

- `


  ### [moveBatchable(moveMode:rate:optionsMask:optionsOverride:)](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait#/s:15GoogleHomeTypes6MatterO17LevelControlTraitV13moveBatchable0H4Mode4rate11optionsMask0L8Override0aB3SDK0I7CommandVyytGAE04MoveJ4EnumO_s5UInt8VSgAE13OptionsBitmapVAUtKF)


  ` The batchable version of move command above.
  See also
  move

  #### Declaration

  Swift

      func moveBatchable(moveMode: https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.LevelControlTrait.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/MoveModeEnum.html, rate: UInt8?, optionsMask: https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.LevelControlTrait.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/OptionsBitmap.html, optionsOverride: https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.LevelControlTrait.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/OptionsBitmap.html) throws -> BatchableCommand<Void>

- `


  ### [supportsStepCommand](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait#/s:15GoogleHomeTypes6MatterO17LevelControlTraitV19supportsStepCommandSbvp)


  ` Whether the device supports the `step` command for this trait.

  #### Declaration

  Swift

      var supportsStepCommand: Bool { get }

- `


  ### [step(stepMode:stepSize:transitionTime:optionsMask:optionsOverride:)](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait#/s:15GoogleHomeTypes6MatterO17LevelControlTraitV4step0H4Mode0H4Size14transitionTime11optionsMask0M8OverrideyAE04StepI4EnumO_s5UInt8Vs6UInt16VSgAE13OptionsBitmapVATtYaKF)


  ` Move a device's level a specific amount over a period of time.
  If the `stepSize` used results in a `https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/Attributes.html#/s:15GoogleHomeTypes6MatterO17LevelControlTraitV10AttributesV07currentE0s5UInt8VSgvp` that is
  greater than the `maxLevel` or less than the `minLevel`, then the command stops when the
  `currentLevel` reaches the `maxLevel` or `minLevel`, respectively.
  The command may complete in a shorter time than specified for `transitionTime` if the
  `maxLevel` or `minLevel` is reached before the transition time is over.

  #### Declaration

  Swift

      func step(stepMode: https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.LevelControlTrait.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/StepModeEnum.html, stepSize: UInt8, transitionTime: UInt16?, optionsMask: https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.LevelControlTrait.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/OptionsBitmap.html, optionsOverride: https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.LevelControlTrait.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/OptionsBitmap.html) async throws

  #### Parameters

  |---|---|
  | ` stepMode ` | The direction in which to move the level. This must be one of the values in \[LevelControlTrait.StepModeEnum\]. |
  | ` stepSize ` | The amount of units to move the device's `https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/Attributes.html#/s:15GoogleHomeTypes6MatterO17LevelControlTraitV10AttributesV07currentE0s5UInt8VSgvp` to. |
  | ` transitionTime ` | The time (in 0.1 seconds) taken to move the device to the new level. |
  | ` optionsMask ` | Determines which bits in the `https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/Attributes.html#/s:15GoogleHomeTypes6MatterO17LevelControlTraitV10AttributesV7optionsAE13OptionsBitmapVSgvp` attribute should be overridden by `optionsOverride`. |
  | ` optionsOverride ` | If the corresponding bit in `optionsMask` is set to `1`, the bit set here overrides the corresponding bit in `https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/Attributes.html#/s:15GoogleHomeTypes6MatterO17LevelControlTraitV10AttributesV7optionsAE13OptionsBitmapVSgvp` attribute. |

- `


  ### [stepBatchable(stepMode:stepSize:transitionTime:optionsMask:optionsOverride:)](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait#/s:15GoogleHomeTypes6MatterO17LevelControlTraitV13stepBatchable0H4Mode0H4Size14transitionTime11optionsMask0N8Override0aB3SDK0I7CommandVyytGAE04StepJ4EnumO_s5UInt8Vs6UInt16VSgAE13OptionsBitmapVAXtKF)


  ` The batchable version of step command above.
  See also
  step

  #### Declaration

  Swift

      func stepBatchable(stepMode: https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.LevelControlTrait.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/StepModeEnum.html, stepSize: UInt8, transitionTime: UInt16?, optionsMask: https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.LevelControlTrait.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/OptionsBitmap.html, optionsOverride: https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.LevelControlTrait.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/OptionsBitmap.html) throws -> BatchableCommand<Void>

- `


  ### [supportsStopCommand](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait#/s:15GoogleHomeTypes6MatterO17LevelControlTraitV19supportsStopCommandSbvp)


  ` Whether the device supports the `stop` command for this trait.

  #### Declaration

  Swift

      var supportsStopCommand: Bool { get }

- `


  ### [stop(optionsMask:optionsOverride:)](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait#/s:15GoogleHomeTypes6MatterO17LevelControlTraitV4stop11optionsMask0I8OverrideyAE13OptionsBitmapV_AJtYaKF)


  ` Terminate a `Move`, `MoveToLevel`, or `Step` command (including their `OnOff` variants)
  currently in progress, and sets the `https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/Attributes.html#/s:15GoogleHomeTypes6MatterO17LevelControlTraitV10AttributesV13remainingTimes6UInt16VSgvp` attribute to
  `0`.
  This command and `StopWithOnOff` are identical.

  #### Declaration

  Swift

      func stop(optionsMask: https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.LevelControlTrait.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/OptionsBitmap.html, optionsOverride: https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.LevelControlTrait.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/OptionsBitmap.html) async throws

  #### Parameters

  |---|---|
  | ` optionsMask ` | Determines which bits in the `https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/Attributes.html#/s:15GoogleHomeTypes6MatterO17LevelControlTraitV10AttributesV7optionsAE13OptionsBitmapVSgvp` attribute should be overridden by `optionsOverride`. |
  | ` optionsOverride ` | If the corresponding bit in `optionsMask` is set to `1`, the bit set here overrides the corresponding bit in `https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/Attributes.html#/s:15GoogleHomeTypes6MatterO17LevelControlTraitV10AttributesV7optionsAE13OptionsBitmapVSgvp` attribute. |

- `


  ### [stopBatchable(optionsMask:optionsOverride:)](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait#/s:15GoogleHomeTypes6MatterO17LevelControlTraitV13stopBatchable11optionsMask0J8Override0aB3SDK0I7CommandVyytGAE13OptionsBitmapV_ANtKF)


  ` The batchable version of stop command above.
  See also
  stop

  #### Declaration

  Swift

      func stopBatchable(optionsMask: https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.LevelControlTrait.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/OptionsBitmap.html, optionsOverride: https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.LevelControlTrait.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/OptionsBitmap.html) throws -> BatchableCommand<Void>

- `


  ### [supportsMoveToLevelWithOnOffCommand](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait#/s:15GoogleHomeTypes6MatterO17LevelControlTraitV014supportsMoveToE16WithOnOffCommandSbvp)


  ` Whether the device supports the `moveToLevelWithOnOff` command for this trait.

  #### Declaration

  Swift

      var supportsMoveToLevelWithOnOffCommand: Bool { get }

- `


  ### [moveToLevelWithOnOff(level:transitionTime:optionsMask:optionsOverride:)](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait#/s:15GoogleHomeTypes6MatterO17LevelControlTraitV06moveToE9WithOnOff5level14transitionTime11optionsMask0P8Overrideys5UInt8V_s6UInt16VSgAE13OptionsBitmapVAQtYaKF)


  ` Move a device from its current level to the provided level and toggle the
  `https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/OnOffTrait/Attributes.html#/s:15GoogleHomeTypes6MatterO10OnOffTraitV10AttributesV02onF0SbSgvp` attribute of the `OnOff` cluster depending on the end value of
  `https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/Attributes.html#/s:15GoogleHomeTypes6MatterO17LevelControlTraitV10AttributesV07currentE0s5UInt8VSgvp`.
  If this command sets the `currentLevel` above the `minLevel`, the
  `https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/OnOffTrait/Attributes.html#/s:15GoogleHomeTypes6MatterO10OnOffTraitV10AttributesV02onF0SbSgvp` attribute is set to true.
  If this command sets the `currentLevel` to the `minLevel`, the `https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/OnOffTrait/Attributes.html#/s:15GoogleHomeTypes6MatterO10OnOffTraitV10AttributesV02onF0SbSgvp`
  attribute is set to false.

  #### Declaration

  Swift

      func moveToLevelWithOnOff(level: UInt8, transitionTime: UInt16?, optionsMask: https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.LevelControlTrait.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/OptionsBitmap.html, optionsOverride: https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.LevelControlTrait.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/OptionsBitmap.html) async throws

  #### Parameters

  |---|---|
  | ` level ` | The level to move the device to. |
  | ` transitionTime ` | The time (in 0.1 seconds) taken to move the device to the new level. |
  | ` optionsMask ` | Determines which bits in the `https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/Attributes.html#/s:15GoogleHomeTypes6MatterO17LevelControlTraitV10AttributesV7optionsAE13OptionsBitmapVSgvp` attribute should be overridden by `optionsOverride`. |
  | ` optionsOverride ` | If the corresponding bit in `optionsMask` is set to `1`, the bit set here overrides the corresponding bit in `https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/Attributes.html#/s:15GoogleHomeTypes6MatterO17LevelControlTraitV10AttributesV7optionsAE13OptionsBitmapVSgvp` attribute. |

- `


  ### [moveToLevelWithOnOffBatchable(level:transitionTime:optionsMask:optionsOverride:)](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait#/s:15GoogleHomeTypes6MatterO17LevelControlTraitV06moveToE18WithOnOffBatchable5level14transitionTime11optionsMask0Q8Override0aB3SDK0M7CommandVyytGs5UInt8V_s6UInt16VSgAE13OptionsBitmapVAUtKF)


  ` The batchable version of moveToLevelWithOnOff command above.
  See also
  moveToLevelWithOnOff

  #### Declaration

  Swift

      func moveToLevelWithOnOffBatchable(level: UInt8, transitionTime: UInt16?, optionsMask: https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.LevelControlTrait.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/OptionsBitmap.html, optionsOverride: https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.LevelControlTrait.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/OptionsBitmap.html) throws -> BatchableCommand<Void>

- `


  ### [supportsMoveWithOnOffCommand](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait#/s:15GoogleHomeTypes6MatterO17LevelControlTraitV28supportsMoveWithOnOffCommandSbvp)


  ` Whether the device supports the `moveWithOnOff` command for this trait.

  #### Declaration

  Swift

      var supportsMoveWithOnOffCommand: Bool { get }

- `


  ### [moveWithOnOff(moveMode:rate:optionsMask:optionsOverride:)](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait#/s:15GoogleHomeTypes6MatterO17LevelControlTraitV13moveWithOnOff0H4Mode4rate11optionsMask0N8OverrideyAE04MoveL4EnumO_s5UInt8VSgAE13OptionsBitmapVAQtYaKF)


  ` Move a device's level based on a rate of movement and toggle the `https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/OnOffTrait/Attributes.html#/s:15GoogleHomeTypes6MatterO10OnOffTraitV10AttributesV02onF0SbSgvp`
  attribute of the `OnOff` cluster depending on the end value of
  `https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/Attributes.html#/s:15GoogleHomeTypes6MatterO17LevelControlTraitV10AttributesV07currentE0s5UInt8VSgvp`.
  If this command sets the `currentLevel` above the `minLevel`, the
  `https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/OnOffTrait/Attributes.html#/s:15GoogleHomeTypes6MatterO10OnOffTraitV10AttributesV02onF0SbSgvp` attribute is set to true.
  If this command sets the `currentLevel` to the `minLevel`, the `https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/OnOffTrait/Attributes.html#/s:15GoogleHomeTypes6MatterO10OnOffTraitV10AttributesV02onF0SbSgvp`
  attribute is set to false.

  #### Declaration

  Swift

      func moveWithOnOff(moveMode: https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.LevelControlTrait.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/MoveModeEnum.html, rate: UInt8?, optionsMask: https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.LevelControlTrait.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/OptionsBitmap.html, optionsOverride: https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.LevelControlTrait.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/OptionsBitmap.html) async throws

  #### Parameters

  |---|---|
  | ` moveMode ` | The direction in which to move the level. This must be one of the values in \[LevelControlTrait.MoveModeEnum\]. |
  | ` rate ` | The rate (in units per seconds) used to move the device's `currentLevel` to the `https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/Attributes.html#/s:15GoogleHomeTypes6MatterO17LevelControlTraitV10AttributesV03minE0s5UInt8VSgvp` or `https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/Attributes.html#/s:15GoogleHomeTypes6MatterO17LevelControlTraitV10AttributesV03maxE0s5UInt8VSgvp`. |
  | ` optionsMask ` | Determines which bits in the `https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/Attributes.html#/s:15GoogleHomeTypes6MatterO17LevelControlTraitV10AttributesV7optionsAE13OptionsBitmapVSgvp` attribute should be overridden by `optionsOverride`. |
  | ` optionsOverride ` | If the corresponding bit in `optionsMask` is set to `1`, the bit set here overrides the corresponding bit in `https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/Attributes.html#/s:15GoogleHomeTypes6MatterO17LevelControlTraitV10AttributesV7optionsAE13OptionsBitmapVSgvp` attribute. |

- `


  ### [moveWithOnOffBatchable(moveMode:rate:optionsMask:optionsOverride:)](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait#/s:15GoogleHomeTypes6MatterO17LevelControlTraitV22moveWithOnOffBatchable0H4Mode4rate11optionsMask0O8Override0aB3SDK0L7CommandVyytGAE04MoveM4EnumO_s5UInt8VSgAE13OptionsBitmapVAUtKF)


  ` The batchable version of moveWithOnOff command above.
  See also
  moveWithOnOff

  #### Declaration

  Swift

      func moveWithOnOffBatchable(moveMode: https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.LevelControlTrait.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/MoveModeEnum.html, rate: UInt8?, optionsMask: https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.LevelControlTrait.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/OptionsBitmap.html, optionsOverride: https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.LevelControlTrait.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/OptionsBitmap.html) throws -> BatchableCommand<Void>

- `


  ### [supportsStepWithOnOffCommand](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait#/s:15GoogleHomeTypes6MatterO17LevelControlTraitV28supportsStepWithOnOffCommandSbvp)


  ` Whether the device supports the `stepWithOnOff` command for this trait.

  #### Declaration

  Swift

      var supportsStepWithOnOffCommand: Bool { get }

- `


  ### [stepWithOnOff(stepMode:stepSize:transitionTime:optionsMask:optionsOverride:)](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait#/s:15GoogleHomeTypes6MatterO17LevelControlTraitV13stepWithOnOff0H4Mode0H4Size14transitionTime11optionsMask0P8OverrideyAE04StepL4EnumO_s5UInt8Vs6UInt16VSgAE13OptionsBitmapVATtYaKF)


  ` Move a device's level a specific amount over a period of time and toggle the
  `https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/OnOffTrait/Attributes.html#/s:15GoogleHomeTypes6MatterO10OnOffTraitV10AttributesV02onF0SbSgvp` attribute of the `OnOff` cluster depending on the end value of
  `https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/Attributes.html#/s:15GoogleHomeTypes6MatterO17LevelControlTraitV10AttributesV07currentE0s5UInt8VSgvp`.
  If the `stepSize` used results in a `https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/Attributes.html#/s:15GoogleHomeTypes6MatterO17LevelControlTraitV10AttributesV07currentE0s5UInt8VSgvp` that is
  greater than the `maxLevel` or less than the `minLevel`, then the command stops when the
  `currentLevel` reaches the `maxLevel` or `minLevel`, respectively.
  The command may complete in a shorter time than specified for `transitionTime` if the
  `maxLevel` or `minLevel` is reached before the transition time is over.
  If this command sets the `currentLevel` above the `minLevel`, the
  `https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/OnOffTrait/Attributes.html#/s:15GoogleHomeTypes6MatterO10OnOffTraitV10AttributesV02onF0SbSgvp` attribute is set to true.
  If this command sets the `currentLevel` to the `minLevel`, the `https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/OnOffTrait/Attributes.html#/s:15GoogleHomeTypes6MatterO10OnOffTraitV10AttributesV02onF0SbSgvp`
  attribute is set to false.

  #### Declaration

  Swift

      func stepWithOnOff(stepMode: https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.LevelControlTrait.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/StepModeEnum.html, stepSize: UInt8, transitionTime: UInt16?, optionsMask: https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.LevelControlTrait.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/OptionsBitmap.html, optionsOverride: https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.LevelControlTrait.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/OptionsBitmap.html) async throws

  #### Parameters

  |---|---|
  | ` stepMode ` | The direction in which to move the level. This must be one of the values in \[LevelControlTrait.StepModeEnum\]. |
  | ` stepSize ` | The amount of units to move the device's `https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/Attributes.html#/s:15GoogleHomeTypes6MatterO17LevelControlTraitV10AttributesV07currentE0s5UInt8VSgvp` to. |
  | ` transitionTime ` | The time (in 0.1 seconds) taken to move the device to the new level. |
  | ` optionsMask ` | Determines which bits in the `https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/Attributes.html#/s:15GoogleHomeTypes6MatterO17LevelControlTraitV10AttributesV7optionsAE13OptionsBitmapVSgvp` attribute should be overridden by `optionsOverride`. |
  | ` optionsOverride ` | If the corresponding bit in `optionsMask` is set to `1`, the bit set here overrides the corresponding bit in `https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/Attributes.html#/s:15GoogleHomeTypes6MatterO17LevelControlTraitV10AttributesV7optionsAE13OptionsBitmapVSgvp` attribute. |

- `


  ### [stepWithOnOffBatchable(stepMode:stepSize:transitionTime:optionsMask:optionsOverride:)](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait#/s:15GoogleHomeTypes6MatterO17LevelControlTraitV22stepWithOnOffBatchable0H4Mode0H4Size14transitionTime11optionsMask0Q8Override0aB3SDK0L7CommandVyytGAE04StepM4EnumO_s5UInt8Vs6UInt16VSgAE13OptionsBitmapVAXtKF)


  ` The batchable version of stepWithOnOff command above.
  See also
  stepWithOnOff

  #### Declaration

  Swift

      func stepWithOnOffBatchable(stepMode: https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.LevelControlTrait.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/StepModeEnum.html, stepSize: UInt8, transitionTime: UInt16?, optionsMask: https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.LevelControlTrait.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/OptionsBitmap.html, optionsOverride: https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.LevelControlTrait.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/OptionsBitmap.html) throws -> BatchableCommand<Void>

- `


  ### [supportsStopWithOnOffCommand](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait#/s:15GoogleHomeTypes6MatterO17LevelControlTraitV28supportsStopWithOnOffCommandSbvp)


  ` Whether the device supports the `stopWithOnOff` command for this trait.

  #### Declaration

  Swift

      var supportsStopWithOnOffCommand: Bool { get }

- `


  ### [stopWithOnOff(optionsMask:optionsOverride:)](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait#/s:15GoogleHomeTypes6MatterO17LevelControlTraitV13stopWithOnOff11optionsMask0L8OverrideyAE13OptionsBitmapV_AJtYaKF)


  ` Terminate a `Move`, `MoveToLevel`, or `Step` command (including their `OnOff` variants)
  currently in progress, and sets the `https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/Attributes.html#/s:15GoogleHomeTypes6MatterO17LevelControlTraitV10AttributesV13remainingTimes6UInt16VSgvp` attribute to
  `0`.
  This command and `Stop` are identical.

  #### Declaration

  Swift

      func stopWithOnOff(optionsMask: https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.LevelControlTrait.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/OptionsBitmap.html, optionsOverride: https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.LevelControlTrait.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/OptionsBitmap.html) async throws

  #### Parameters

  |---|---|
  | ` optionsMask ` | Determines which bits in the `https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/Attributes.html#/s:15GoogleHomeTypes6MatterO17LevelControlTraitV10AttributesV7optionsAE13OptionsBitmapVSgvp` attribute should be overridden by `optionsOverride`. |
  | ` optionsOverride ` | If the corresponding bit in `optionsMask` is set to `1`, the bit set here overrides the corresponding bit in `https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/Attributes.html#/s:15GoogleHomeTypes6MatterO17LevelControlTraitV10AttributesV7optionsAE13OptionsBitmapVSgvp` attribute. |

- `


  ### [stopWithOnOffBatchable(optionsMask:optionsOverride:)](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait#/s:15GoogleHomeTypes6MatterO17LevelControlTraitV22stopWithOnOffBatchable11optionsMask0M8Override0aB3SDK0L7CommandVyytGAE13OptionsBitmapV_ANtKF)


  ` The batchable version of stopWithOnOff command above.
  See also
  stopWithOnOff

  #### Declaration

  Swift

      func stopWithOnOffBatchable(optionsMask: https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.LevelControlTrait.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/OptionsBitmap.html, optionsOverride: https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.LevelControlTrait.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/OptionsBitmap.html) throws -> BatchableCommand<Void>

- `


  ### [supportsMoveToClosestFrequencyCommand](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait#/s:15GoogleHomeTypes6MatterO17LevelControlTraitV37supportsMoveToClosestFrequencyCommandSbvp)


  ` Whether the device supports the `moveToClosestFrequency` command for this trait.

  #### Declaration

  Swift

      var supportsMoveToClosestFrequencyCommand: Bool { get }

- `


  ### [moveToClosestFrequency(frequency:)](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait#/s:15GoogleHomeTypes6MatterO17LevelControlTraitV22moveToClosestFrequency9frequencyys6UInt16V_tYaKF)


  ` Change a device's current frequency.

  #### Declaration

  Swift

      func moveToClosestFrequency(frequency: UInt16) async throws

  #### Parameters

  |---|---|
  | ` frequency ` | The frequency to change the `https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/Attributes.html#/s:15GoogleHomeTypes6MatterO17LevelControlTraitV10AttributesV16currentFrequencys6UInt16VSgvp` to. |

- `


  ### [moveToClosestFrequencyBatchable(frequency:)](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait#/s:15GoogleHomeTypes6MatterO17LevelControlTraitV31moveToClosestFrequencyBatchable9frequency0aB3SDK0L7CommandVyytGs6UInt16V_tKF)


  ` The batchable version of moveToClosestFrequency command above.
  See also
  moveToClosestFrequency

  #### Declaration

  Swift

      func moveToClosestFrequencyBatchable(frequency: UInt16) throws -> BatchableCommand<Void>

- `


  ### [MoveModeEnum](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/MoveModeEnum.html)


  ` The direction in which to move a device's level.

  #### Declaration

  Swift

      enum MoveModeEnum

- `


  ### [StepModeEnum](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/StepModeEnum.html)


  ` The direction in which to step a device's level.

  #### Declaration

  Swift

      enum StepModeEnum

- `


  ### [Feature](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/Feature.html)


  ` LevelControl cluster FeatureMap. Some behaviors of these features are described in the cluster
  attributes and commands. For complete details of these features, see the [Matter
  Specification](https://csa-iot.org/developer-resource/specifications-download-request/).

  #### Declaration

  Swift

      struct Feature

- `


  ### [OptionsBitmap](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/LevelControlTrait/OptionsBitmap.html)


  ` Flags for LevelControl options.

  #### Declaration

  Swift

      struct OptionsBitmap