# WindowCoveringTrait

    struct WindowCoveringTrait

This trait provides an interface to an automatic window covering that can be raised or tilted.
- `


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


  ` No supported events for `WindowCoveringTrait`.

  #### Declaration

  Swift

      static let supportedEventTypes: [any Event.Type]

- `


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


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

  #### Declaration

  Swift

      static let supportedCommandTypes: [any Command.Type]

- `


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


  ` The trait identifier.

  #### Declaration

  Swift

      static let identifier: String

- `


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


  ` Metadata about this `Trait`.

  #### Declaration

  Swift

      let metadata: TraitMetadata

- `


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


  ` List of attributes for the `WindowCoveringTrait`.

  #### Declaration

  Swift

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

- `


  ### [init(decoder:interactionProxy:metadata:)](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/WindowCoveringTrait#/s:15GoogleHomeTypes6MatterO19WindowCoveringTraitV7decoder16interactionProxy8metadataAE0aB3SDK0G7DecoderV_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/WindowCoveringTrait#/s:15GoogleHomeTypes6MatterO19WindowCoveringTraitV6encode4withy0aB3SDK0G7EncoderC_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/WindowCoveringTrait#/s:15GoogleHomeTypes6MatterO19WindowCoveringTraitV9forceReadyyYaKF)


  ` 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/WindowCoveringTrait/Attributes.html)


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

  #### Declaration

  Swift

      struct Attributes

- `


  ### [==(_:_:)](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/WindowCoveringTrait#/s:15GoogleHomeTypes6MatterO19WindowCoveringTraitV2eeoiySbAE_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.WindowCoveringTrait, rhs: https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.WindowCoveringTrait) -> Bool

  #### Parameters

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

- `


  ### [hash(into:)](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/WindowCoveringTrait#/s:15GoogleHomeTypes6MatterO19WindowCoveringTraitV4hash4intoys6HasherVz_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)

- `


  ### [supportsUpOrOpenCommand](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/WindowCoveringTrait#/s:15GoogleHomeTypes6MatterO19WindowCoveringTraitV23supportsUpOrOpenCommandSbvp)


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

  #### Declaration

  Swift

      var supportsUpOrOpenCommand: Bool { get }

- `


  ### [upOrOpen()](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/WindowCoveringTrait#/s:15GoogleHomeTypes6MatterO19WindowCoveringTraitV8upOrOpenyyYaKF)


  ` Adjust the window covering position so the physical lift or slide and tilt is at the maximum
  open or up position.

  #### Declaration

  Swift

      func upOrOpen() async throws

- `


  ### [upOrOpenBatchable()](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/WindowCoveringTrait#/s:15GoogleHomeTypes6MatterO19WindowCoveringTraitV17upOrOpenBatchable0aB3SDK0K7CommandVyytGyKF)


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

  #### Declaration

  Swift

      func upOrOpenBatchable() throws -> BatchableCommand<Void>

- `


  ### [supportsDownOrCloseCommand](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/WindowCoveringTrait#/s:15GoogleHomeTypes6MatterO19WindowCoveringTraitV26supportsDownOrCloseCommandSbvp)


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

  #### Declaration

  Swift

      var supportsDownOrCloseCommand: Bool { get }

- `


  ### [downOrClose()](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/WindowCoveringTrait#/s:15GoogleHomeTypes6MatterO19WindowCoveringTraitV11downOrCloseyyYaKF)


  ` Adjust the window covering position so the physical lift or slide and tilt is at the maximum
  closed or down position.

  #### Declaration

  Swift

      func downOrClose() async throws

- `


  ### [downOrCloseBatchable()](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/WindowCoveringTrait#/s:15GoogleHomeTypes6MatterO19WindowCoveringTraitV20downOrCloseBatchable0aB3SDK0K7CommandVyytGyKF)


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

  #### Declaration

  Swift

      func downOrCloseBatchable() throws -> BatchableCommand<Void>

- `


  ### [supportsStopMotionCommand](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/WindowCoveringTrait#/s:15GoogleHomeTypes6MatterO19WindowCoveringTraitV25supportsStopMotionCommandSbvp)


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

  #### Declaration

  Swift

      var supportsStopMotionCommand: Bool { get }

- `


  ### [stopMotion()](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/WindowCoveringTrait#/s:15GoogleHomeTypes6MatterO19WindowCoveringTraitV10stopMotionyyYaKF)


  ` Stop any adjustments to physical tilt and lift or slide that is currently underway.

  #### Declaration

  Swift

      func stopMotion() async throws

- `


  ### [stopMotionBatchable()](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/WindowCoveringTrait#/s:15GoogleHomeTypes6MatterO19WindowCoveringTraitV19stopMotionBatchable0aB3SDK0J7CommandVyytGyKF)


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

  #### Declaration

  Swift

      func stopMotionBatchable() throws -> BatchableCommand<Void>

- `


  ### [supportsGoToLiftValueCommand](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/WindowCoveringTrait#/s:15GoogleHomeTypes6MatterO19WindowCoveringTraitV28supportsGoToLiftValueCommandSbvp)


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

  #### Declaration

  Swift

      var supportsGoToLiftValueCommand: Bool { get }

- `


  ### [goToLiftValue(liftValue:)](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/WindowCoveringTrait#/s:15GoogleHomeTypes6MatterO19WindowCoveringTraitV13goToLiftValue04liftK0ys6UInt16V_tYaKF)


  ` Adjust the window covering to the specified lift position.
  The specified lift position must be between
  `https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/WindowCoveringTrait/Attributes.html#/s:15GoogleHomeTypes6MatterO19WindowCoveringTraitV10AttributesV24installedClosedLimitLifts6UInt16VSgvp` and
  `https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/WindowCoveringTrait/Attributes.html#/s:15GoogleHomeTypes6MatterO19WindowCoveringTraitV10AttributesV22installedOpenLimitLifts6UInt16VSgvp`.

  #### Declaration

  Swift

      func goToLiftValue(liftValue: UInt16) async throws

  #### Parameters

  |---|---|
  | ` liftValue ` | The lift position, in centimeters. |

- `


  ### [goToLiftValueBatchable(liftValue:)](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/WindowCoveringTrait#/s:15GoogleHomeTypes6MatterO19WindowCoveringTraitV22goToLiftValueBatchable04liftK00aB3SDK0L7CommandVyytGs6UInt16V_tKF)


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

  #### Declaration

  Swift

      func goToLiftValueBatchable(liftValue: UInt16) throws -> BatchableCommand<Void>

- `


  ### [supportsGoToLiftPercentageCommand](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/WindowCoveringTrait#/s:15GoogleHomeTypes6MatterO19WindowCoveringTraitV33supportsGoToLiftPercentageCommandSbvp)


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

  #### Declaration

  Swift

      var supportsGoToLiftPercentageCommand: Bool { get }

- `


  ### [goToLiftPercentage(liftPercent100thsValue:)](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/WindowCoveringTrait#/s:15GoogleHomeTypes6MatterO19WindowCoveringTraitV18goToLiftPercentage22liftPercent100thsValueys6UInt16V_tYaKF)


  ` Adjust the window covering to the specified lift position.

  #### Declaration

  Swift

      func goToLiftPercentage(liftPercent100thsValue: UInt16) async throws

  #### Parameters

  |---|---|
  | ` liftPercent100thsValue ` | The lift position, as a percentage. |

- `


  ### [goToLiftPercentageBatchable(liftPercent100thsValue:)](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/WindowCoveringTrait#/s:15GoogleHomeTypes6MatterO19WindowCoveringTraitV27goToLiftPercentageBatchable22liftPercent100thsValue0aB3SDK0L7CommandVyytGs6UInt16V_tKF)


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

  #### Declaration

  Swift

      func goToLiftPercentageBatchable(liftPercent100thsValue: UInt16) throws -> BatchableCommand<Void>

- `


  ### [supportsGoToTiltValueCommand](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/WindowCoveringTrait#/s:15GoogleHomeTypes6MatterO19WindowCoveringTraitV28supportsGoToTiltValueCommandSbvp)


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

  #### Declaration

  Swift

      var supportsGoToTiltValueCommand: Bool { get }

- `


  ### [goToTiltValue(tiltValue:)](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/WindowCoveringTrait#/s:15GoogleHomeTypes6MatterO19WindowCoveringTraitV13goToTiltValue04tiltK0ys6UInt16V_tYaKF)


  ` Adjust the window covering to the specified tilt position.
  The specified tilt position must be between
  `https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/WindowCoveringTrait/Attributes.html#/s:15GoogleHomeTypes6MatterO19WindowCoveringTraitV10AttributesV24installedClosedLimitTilts6UInt16VSgvp` and
  `https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/WindowCoveringTrait/Attributes.html#/s:15GoogleHomeTypes6MatterO19WindowCoveringTraitV10AttributesV22installedOpenLimitTilts6UInt16VSgvp`.

  #### Declaration

  Swift

      func goToTiltValue(tiltValue: UInt16) async throws

  #### Parameters

  |---|---|
  | ` tiltValue ` | The tilt position, in degrees. |

- `


  ### [goToTiltValueBatchable(tiltValue:)](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/WindowCoveringTrait#/s:15GoogleHomeTypes6MatterO19WindowCoveringTraitV22goToTiltValueBatchable04tiltK00aB3SDK0L7CommandVyytGs6UInt16V_tKF)


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

  #### Declaration

  Swift

      func goToTiltValueBatchable(tiltValue: UInt16) throws -> BatchableCommand<Void>

- `


  ### [supportsGoToTiltPercentageCommand](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/WindowCoveringTrait#/s:15GoogleHomeTypes6MatterO19WindowCoveringTraitV33supportsGoToTiltPercentageCommandSbvp)


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

  #### Declaration

  Swift

      var supportsGoToTiltPercentageCommand: Bool { get }

- `


  ### [goToTiltPercentage(tiltPercent100thsValue:)](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/WindowCoveringTrait#/s:15GoogleHomeTypes6MatterO19WindowCoveringTraitV18goToTiltPercentage22tiltPercent100thsValueys6UInt16V_tYaKF)


  ` Adjust the window covering to the specified tilt position.

  #### Declaration

  Swift

      func goToTiltPercentage(tiltPercent100thsValue: UInt16) async throws

  #### Parameters

  |---|---|
  | ` tiltPercent100thsValue ` | The tilt position, in hundredths of a percent. |

- `


  ### [goToTiltPercentageBatchable(tiltPercent100thsValue:)](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/WindowCoveringTrait#/s:15GoogleHomeTypes6MatterO19WindowCoveringTraitV27goToTiltPercentageBatchable22tiltPercent100thsValue0aB3SDK0L7CommandVyytGs6UInt16V_tKF)


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

  #### Declaration

  Swift

      func goToTiltPercentageBatchable(tiltPercent100thsValue: UInt16) throws -> BatchableCommand<Void>

- `


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


  ` With the `Type`, this specifies the subtype of window covering.

  #### Declaration

  Swift

      enum EndProductType

- `


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


  ` The type of window covering.

  #### Declaration

  Swift

      enum WindowCoveringType

- `


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


  ` Configuration and status information for the WindowCovering.

  #### Declaration

  Swift

      struct ConfigStatus

- `


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


  ` WindowCovering cluster FeatureMap.

  #### Declaration

  Swift

      struct Feature

- `


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


  ` Can be used to configure the window covering by enabling or disabling various modes and
  capabilities.

  #### Declaration

  Swift

      struct Mode

- `


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


  ` Indicates in which direction the covering is currently moving or if it has stopped.

  #### Declaration

  Swift

      struct OperationalStatus

- `


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


  ` Reflects the state of the safety sensors and the common issues preventing movements.

  #### Declaration

  Swift

      struct SafetyStatus