ColorControlTrait

struct ColorControlTrait

This trait provides an interface for changing the color of a light.

  • No supported events for ColorControlTrait.

    Declaration

    Swift

    static let supportedEventTypes: [any Event.Type]
  • List of the commands that are supported by ColorControlTrait.

    Declaration

    Swift

    static let supportedCommandTypes: [any Command.Type]
  • The trait identifier.

    Declaration

    Swift

    static let identifier: String
  • Metadata about this Trait.

    Declaration

    Swift

    let metadata: TraitMetadata
  • List of attributes for the ColorControlTrait.

    Declaration

    Swift

    let attributes: Matter.ColorControlTrait.Attributes
  • 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.

  • 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
  • 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 HomeErrors thrown by this call.

    Declaration

    Swift

    func forceRead() async throws
  • Attributes for the ColorControlTrait.

    Declaration

    Swift

    struct Attributes
  • 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: Matter.ColorControlTrait, rhs: Matter.ColorControlTrait) -> Bool

    Parameters

    lhs

    A value to compare.

    rhs

    Another value to compare.

  • 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)
  • Whether the device supports the moveToHue command for this trait.

    Declaration

    Swift

    var supportsMoveToHueCommand: Bool { get }
  • Move a device from its current hue to the provided hue.

    Declaration

    Swift

    func moveToHue(hue: UInt8, direction: Matter.ColorControlTrait.DirectionEnum, transitionTime: UInt16, optionsMask: Matter.ColorControlTrait.OptionsBitmap, optionsOverride: Matter.ColorControlTrait.OptionsBitmap) async throws

    Parameters

    hue

    The hue to be moved to. The valid range of values is 0 to 254.

    direction

    The direction in which to move the hue. This must be one of the values in HueDirection.

    transitionTime

    The time (in 0.1 seconds) taken to move the device to the new hue.

    optionsMask

    Determines which bits in the options 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 options attribute.

  • The batchable version of moveToHue command above.

    See also

    moveToHue

    Declaration

    Swift

    func moveToHueBatchable(hue: UInt8, direction: Matter.ColorControlTrait.DirectionEnum, transitionTime: UInt16, optionsMask: Matter.ColorControlTrait.OptionsBitmap, optionsOverride: Matter.ColorControlTrait.OptionsBitmap) throws -> BatchableCommand<Void>
  • Whether the device supports the moveHue command for this trait.

    Declaration

    Swift

    var supportsMoveHueCommand: Bool { get }
  • Change a device’s hue based on a rate of movement.

    Declaration

    Swift

    func moveHue(moveMode: Matter.ColorControlTrait.MoveModeEnum, rate: UInt8, optionsMask: Matter.ColorControlTrait.OptionsBitmap, optionsOverride: Matter.ColorControlTrait.OptionsBitmap) async throws

    Parameters

    moveMode

    The direction in which to move the hue. This must be one of the values in HueMoveMode.

    rate

    The rate (in steps per seconds) used to change the device’s currentHue.

    optionsMask

    Determines which bits in the options 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 options attribute.

  • The batchable version of moveHue command above.

    See also

    moveHue

    Declaration

    Swift

    func moveHueBatchable(moveMode: Matter.ColorControlTrait.MoveModeEnum, rate: UInt8, optionsMask: Matter.ColorControlTrait.OptionsBitmap, optionsOverride: Matter.ColorControlTrait.OptionsBitmap) throws -> BatchableCommand<Void>
  • Whether the device supports the stepHue command for this trait.

    Declaration

    Swift

    var supportsStepHueCommand: Bool { get }
  • Move a device’s hue a specific amount over a period of time.

    Declaration

    Swift

    func stepHue(stepMode: Matter.ColorControlTrait.StepModeEnum, stepSize: UInt8, transitionTime: UInt8, optionsMask: Matter.ColorControlTrait.OptionsBitmap, optionsOverride: Matter.ColorControlTrait.OptionsBitmap) async throws

    Parameters

    stepMode

    The direction in which to move the hue. This must be one of the values in HueStepMode.

    stepSize

    The amount of units to move the device’s currentHue to.

    transitionTime

    The time (in 0.1 seconds) taken to move the device to the new hue.

    optionsMask

    Determines which bits in the options 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 options attribute.

  • The batchable version of stepHue command above.

    See also

    stepHue

    Declaration

    Swift

    func stepHueBatchable(stepMode: Matter.ColorControlTrait.StepModeEnum, stepSize: UInt8, transitionTime: UInt8, optionsMask: Matter.ColorControlTrait.OptionsBitmap, optionsOverride: Matter.ColorControlTrait.OptionsBitmap) throws -> BatchableCommand<Void>
  • Whether the device supports the moveToSaturation command for this trait.

    Declaration

    Swift

    var supportsMoveToSaturationCommand: Bool { get }
  • Move a device from its current saturation to the provided saturation.

    Declaration

    Swift

    func moveToSaturation(saturation: UInt8, transitionTime: UInt16, optionsMask: Matter.ColorControlTrait.OptionsBitmap, optionsOverride: Matter.ColorControlTrait.OptionsBitmap) async throws

    Parameters

    saturation

    The saturation to be moved to. The valid range of values is 0 to 254.

    transitionTime

    The time (in 0.1 seconds) taken to move the device to the new saturation.

    optionsMask

    Determines which bits in the options 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 options attribute.

  • The batchable version of moveToSaturation command above.

    See also

    moveToSaturation

    Declaration

    Swift

    func moveToSaturationBatchable(saturation: UInt8, transitionTime: UInt16, optionsMask: Matter.ColorControlTrait.OptionsBitmap, optionsOverride: Matter.ColorControlTrait.OptionsBitmap) throws -> BatchableCommand<Void>
  • Whether the device supports the moveSaturation command for this trait.

    Declaration

    Swift

    var supportsMoveSaturationCommand: Bool { get }
  • Change a device’s saturation based on a rate of movement.

    Declaration

    Swift

    func moveSaturation(moveMode: Matter.ColorControlTrait.MoveModeEnum, rate: UInt8, optionsMask: Matter.ColorControlTrait.OptionsBitmap, optionsOverride: Matter.ColorControlTrait.OptionsBitmap) async throws

    Parameters

    moveMode

    The direction in which to move the saturation. This must be one of the values in SaturationMoveMode.

    rate

    The rate (in steps per seconds) used to change the device’s currentSaturation.

    optionsMask

    Determines which bits in the options 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 options attribute.

  • The batchable version of moveSaturation command above.

    See also

    moveSaturation

    Declaration

    Swift

    func moveSaturationBatchable(moveMode: Matter.ColorControlTrait.MoveModeEnum, rate: UInt8, optionsMask: Matter.ColorControlTrait.OptionsBitmap, optionsOverride: Matter.ColorControlTrait.OptionsBitmap) throws -> BatchableCommand<Void>
  • Whether the device supports the stepSaturation command for this trait.

    Declaration

    Swift

    var supportsStepSaturationCommand: Bool { get }
  • Move a device’s saturation a specific amount over a period of time.

    Declaration

    Swift

    func stepSaturation(stepMode: Matter.ColorControlTrait.StepModeEnum, stepSize: UInt8, transitionTime: UInt8, optionsMask: Matter.ColorControlTrait.OptionsBitmap, optionsOverride: Matter.ColorControlTrait.OptionsBitmap) async throws

    Parameters

    stepMode

    The direction in which to move the saturation. This must be one of the values in SaturationStepMode.

    stepSize

    The amount of units to move the device’s currentSaturation to.

    transitionTime

    The time (in 0.1 seconds) taken to move the device to the new saturation.

    optionsMask

    Determines which bits in the options 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 options attribute.

  • The batchable version of stepSaturation command above.

    See also

    stepSaturation

    Declaration

    Swift

    func stepSaturationBatchable(stepMode: Matter.ColorControlTrait.StepModeEnum, stepSize: UInt8, transitionTime: UInt8, optionsMask: Matter.ColorControlTrait.OptionsBitmap, optionsOverride: Matter.ColorControlTrait.OptionsBitmap) throws -> BatchableCommand<Void>
  • Whether the device supports the moveToHueAndSaturation command for this trait.

    Declaration

    Swift

    var supportsMoveToHueAndSaturationCommand: Bool { get }
  • Move a device from its current hue and saturation to the provided hue and saturation.

    Declaration

    Swift

    func moveToHueAndSaturation(hue: UInt8, saturation: UInt8, transitionTime: UInt16, optionsMask: Matter.ColorControlTrait.OptionsBitmap, optionsOverride: Matter.ColorControlTrait.OptionsBitmap) async throws

    Parameters

    hue

    The hue to be moved to. The valid range of values is 0 to 254.

    saturation

    The saturation to be moved to. The valid range of values is 0 to 254.

    transitionTime

    The time (in 0.1 seconds) taken to move the device to the new hue and saturation.

    optionsMask

    Determines which bits in the options 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 options attribute.

  • The batchable version of moveToHueAndSaturation command above.

    See also

    moveToHueAndSaturation

    Declaration

    Swift

    func moveToHueAndSaturationBatchable(hue: UInt8, saturation: UInt8, transitionTime: UInt16, optionsMask: Matter.ColorControlTrait.OptionsBitmap, optionsOverride: Matter.ColorControlTrait.OptionsBitmap) throws -> BatchableCommand<Void>
  • Whether the device supports the moveToColor command for this trait.

    Declaration

    Swift

    var supportsMoveToColorCommand: Bool { get }
  • Move a device from its current color to the color given in the colorX and colorY parameters.

    Declaration

    Swift

    func moveToColor(colorX: UInt16, colorY: UInt16, transitionTime: UInt16, optionsMask: Matter.ColorControlTrait.OptionsBitmap, optionsOverride: Matter.ColorControlTrait.OptionsBitmap) async throws

    Parameters

    colorX

    The normalized chromaticity value x, as defined in the CIE xyY Color Space, to move the device’s color to.

    colorY

    The normalized chromaticity value y, as defined in the CIE xyY Color Space, to move the device’s color to.

    transitionTime

    The time (in 0.1 seconds) taken to move the device to the new color.

    optionsMask

    Determines which bits in the options 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 options attribute.

  • The batchable version of moveToColor command above.

    See also

    moveToColor

    Declaration

    Swift

    func moveToColorBatchable(colorX: UInt16, colorY: UInt16, transitionTime: UInt16, optionsMask: Matter.ColorControlTrait.OptionsBitmap, optionsOverride: Matter.ColorControlTrait.OptionsBitmap) throws -> BatchableCommand<Void>
  • Whether the device supports the moveColor command for this trait.

    Declaration

    Swift

    var supportsMoveColorCommand: Bool { get }
  • Move a device from its current color in a continuous fashion according to the rates specified. This command will continue to process until the target color for the next step cannot be implemented on the device. Setting both rateX and rateY to 0 stops any previously received command of the ColorControl cluster.

    Declaration

    Swift

    func moveColor(rateX: Int16, rateY: Int16, optionsMask: Matter.ColorControlTrait.OptionsBitmap, optionsOverride: Matter.ColorControlTrait.OptionsBitmap) async throws

    Parameters

    rateX

    The rate of movement in steps per second. A step is a change of one unit to the currentX attribute.

    rateY

    The rate of movement in steps per second. A step is a change of one unit to the currentY attribute.

    optionsMask

    Determines which bits in the options 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 options attribute.

  • The batchable version of moveColor command above.

    See also

    moveColor

    Declaration

    Swift

    func moveColorBatchable(rateX: Int16, rateY: Int16, optionsMask: Matter.ColorControlTrait.OptionsBitmap, optionsOverride: Matter.ColorControlTrait.OptionsBitmap) throws -> BatchableCommand<Void>
  • Whether the device supports the stepColor command for this trait.

    Declaration

    Swift

    var supportsStepColorCommand: Bool { get }
  • Move a device from its current color by the specified color step. If the required step is larger than supported by the stepX and stepY parameters, use this command multiple times.

    Declaration

    Swift

    func stepColor(stepX: Int16, stepY: Int16, transitionTime: UInt16, optionsMask: Matter.ColorControlTrait.OptionsBitmap, optionsOverride: Matter.ColorControlTrait.OptionsBitmap) async throws

    Parameters

    stepX

    The change to be added to the device’s currentX attribute.

    stepY

    The change to be added to the device’s currentY attribute.

    transitionTime

    The time (in 0.1 seconds) taken to move the device to the new color.

    optionsMask

    Determines which bits in the options 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 options attribute.

  • The batchable version of stepColor command above.

    See also

    stepColor

    Declaration

    Swift

    func stepColorBatchable(stepX: Int16, stepY: Int16, transitionTime: UInt16, optionsMask: Matter.ColorControlTrait.OptionsBitmap, optionsOverride: Matter.ColorControlTrait.OptionsBitmap) throws -> BatchableCommand<Void>
  • Whether the device supports the moveToColorTemperature command for this trait.

    Declaration

    Swift

    var supportsMoveToColorTemperatureCommand: Bool { get }
  • Move a device from its current color to a new color, using the scaled inverse of the color temperature, in mireds.

    Declaration

    Swift

    func moveToColorTemperature(colorTemperatureMireds: UInt16, transitionTime: UInt16, optionsMask: Matter.ColorControlTrait.OptionsBitmap, optionsOverride: Matter.ColorControlTrait.OptionsBitmap) async throws

    Parameters

    colorTemperatureMireds

    The color temperature, in mireds, to move the device to.

    transitionTime

    The time (in 0.1 seconds) taken to move the device to the new color temperature.

    optionsMask

    Determines which bits in the options 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 options attribute.

  • The batchable version of moveToColorTemperature command above.

    See also

    moveToColorTemperature

    Declaration

    Swift

    func moveToColorTemperatureBatchable(colorTemperatureMireds: UInt16, transitionTime: UInt16, optionsMask: Matter.ColorControlTrait.OptionsBitmap, optionsOverride: Matter.ColorControlTrait.OptionsBitmap) throws -> BatchableCommand<Void>
  • Whether the device supports the enhancedMoveToHue command for this trait.

    Declaration

    Swift

    var supportsEnhancedMoveToHueCommand: Bool { get }
  • Move a device from its current hue to the provided enhanced hue.

    Declaration

    Swift

    func enhancedMoveToHue(enhancedHue: UInt16, direction: Matter.ColorControlTrait.DirectionEnum, transitionTime: UInt16, optionsMask: Matter.ColorControlTrait.OptionsBitmap, optionsOverride: Matter.ColorControlTrait.OptionsBitmap) async throws

    Parameters

    enhancedHue

    The enhanced hue to be moved to. The valid range of values is 0 to 65534.

    direction

    The direction in which to move the enhanced hue. This must be one of the values in HueDirection.

    transitionTime

    The time (in 0.1 seconds) taken to move the device to the new hue.

    optionsMask

    Determines which bits in the options 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 options attribute.

  • The batchable version of enhancedMoveToHue command above.

    See also

    enhancedMoveToHue

    Declaration

    Swift

    func enhancedMoveToHueBatchable(enhancedHue: UInt16, direction: Matter.ColorControlTrait.DirectionEnum, transitionTime: UInt16, optionsMask: Matter.ColorControlTrait.OptionsBitmap, optionsOverride: Matter.ColorControlTrait.OptionsBitmap) throws -> BatchableCommand<Void>
  • Whether the device supports the enhancedMoveHue command for this trait.

    Declaration

    Swift

    var supportsEnhancedMoveHueCommand: Bool { get }
  • Change a device’s enhanced hue based on a rate of movement.

    Declaration

    Swift

    func enhancedMoveHue(moveMode: Matter.ColorControlTrait.MoveModeEnum, rate: UInt16, optionsMask: Matter.ColorControlTrait.OptionsBitmap, optionsOverride: Matter.ColorControlTrait.OptionsBitmap) async throws

    Parameters

    moveMode

    The direction in which to move the enhanced hue. This must be one of the values in HueMoveMode.

    rate

    The rate (in steps per seconds) used to change the device’s enhancedCurrentHue.

    optionsMask

    Determines which bits in the options 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 options attribute.

  • The batchable version of enhancedMoveHue command above.

    See also

    enhancedMoveHue

    Declaration

    Swift

    func enhancedMoveHueBatchable(moveMode: Matter.ColorControlTrait.MoveModeEnum, rate: UInt16, optionsMask: Matter.ColorControlTrait.OptionsBitmap, optionsOverride: Matter.ColorControlTrait.OptionsBitmap) throws -> BatchableCommand<Void>
  • Whether the device supports the enhancedStepHue command for this trait.

    Declaration

    Swift

    var supportsEnhancedStepHueCommand: Bool { get }
  • Move a device’s enhanced hue a specific amount over a period of time.

    Declaration

    Swift

    func enhancedStepHue(stepMode: Matter.ColorControlTrait.StepModeEnum, stepSize: UInt16, transitionTime: UInt16, optionsMask: Matter.ColorControlTrait.OptionsBitmap, optionsOverride: Matter.ColorControlTrait.OptionsBitmap) async throws

    Parameters

    stepMode

    The direction in which to move the enhanced hue. This must be one of the values in HueStepMode.

    stepSize

    The amount of units to move the device’s enhancedCurrentHue to.

    transitionTime

    The time (in 0.1 seconds) taken to move the device to the new enhanced hue.

    optionsMask

    Determines which bits in the options 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 options attribute.

  • The batchable version of enhancedStepHue command above.

    See also

    enhancedStepHue

    Declaration

    Swift

    func enhancedStepHueBatchable(stepMode: Matter.ColorControlTrait.StepModeEnum, stepSize: UInt16, transitionTime: UInt16, optionsMask: Matter.ColorControlTrait.OptionsBitmap, optionsOverride: Matter.ColorControlTrait.OptionsBitmap) throws -> BatchableCommand<Void>
  • Whether the device supports the enhancedMoveToHueAndSaturation command for this trait.

    Declaration

    Swift

    var supportsEnhancedMoveToHueAndSaturationCommand: Bool { get }
  • Move a device from its current enhanced hue and saturation to the provided enhanced hue and saturation.

    Declaration

    Swift

    func enhancedMoveToHueAndSaturation(enhancedHue: UInt16, saturation: UInt8, transitionTime: UInt16, optionsMask: Matter.ColorControlTrait.OptionsBitmap, optionsOverride: Matter.ColorControlTrait.OptionsBitmap) async throws

    Parameters

    enhancedHue

    The enhanced hue to be moved to. The valid range of values is 0 to 65534.

    saturation

    The saturation to be moved to. The valid range of values is 0 to 254.

    transitionTime

    The time (in 0.1 seconds) taken to move the device to the new enhanced hue and saturation.

    optionsMask

    Determines which bits in the options 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 options attribute.

  • The batchable version of enhancedMoveToHueAndSaturation command above.

    See also

    enhancedMoveToHueAndSaturation

    Declaration

    Swift

    func enhancedMoveToHueAndSaturationBatchable(enhancedHue: UInt16, saturation: UInt8, transitionTime: UInt16, optionsMask: Matter.ColorControlTrait.OptionsBitmap, optionsOverride: Matter.ColorControlTrait.OptionsBitmap) throws -> BatchableCommand<Void>
  • Whether the device supports the colorLoopSet command for this trait.

    Declaration

    Swift

    var supportsColorLoopSetCommand: Bool { get }
  • Cycles the device through its range of hues.

    Declaration

    Swift

    func colorLoopSet(updateFlags: Matter.ColorControlTrait.UpdateFlagsBitmap, action: Matter.ColorControlTrait.ColorLoopActionEnum, direction: Matter.ColorControlTrait.ColorLoopDirectionEnum, time: UInt16, startHue: UInt16, optionsMask: Matter.ColorControlTrait.OptionsBitmap, optionsOverride: Matter.ColorControlTrait.OptionsBitmap) async throws

    Parameters

    updateFlags

    The attributes to update before the color loop starts. See ColorLoopUpdateFlags for the list of flags to use.

    action

    The action to take if updateAction is set in updateFlags. Must be a value from ColorLoopActionEnum.

    direction

    The direction of the color loop if updateDirection is set in updateFlags. Must be a value from ColorLoopDirectionEnum.

    time

    The number of seconds over which to perform the full color loop if updateTime is set in updateFlags.

    startHue

    The starting hue to use if updateStartHue is set in updateFlags.

    optionsMask

    Determines which bits in the options 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 options attribute.

  • The batchable version of colorLoopSet command above.

    See also

    colorLoopSet

    Declaration

    Swift

    func colorLoopSetBatchable(updateFlags: Matter.ColorControlTrait.UpdateFlagsBitmap, action: Matter.ColorControlTrait.ColorLoopActionEnum, direction: Matter.ColorControlTrait.ColorLoopDirectionEnum, time: UInt16, startHue: UInt16, optionsMask: Matter.ColorControlTrait.OptionsBitmap, optionsOverride: Matter.ColorControlTrait.OptionsBitmap) throws -> BatchableCommand<Void>
  • Whether the device supports the stopMoveStep command for this trait.

    Declaration

    Swift

    var supportsStopMoveStepCommand: Bool { get }
  • Stop a MoveTo, Move, or Step command that is currently in process. The currentHue, enhancedCurrentHue, and currentSaturation attributes are left at their present value upon receipt of this command, and the remainingTime attribute is set to 0.

    Declaration

    Swift

    func stopMoveStep(optionsMask: Matter.ColorControlTrait.OptionsBitmap, optionsOverride: Matter.ColorControlTrait.OptionsBitmap) async throws

    Parameters

    optionsMask

    Determines which bits in the options 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 options attribute.

  • The batchable version of stopMoveStep command above.

    See also

    stopMoveStep

    Declaration

    Swift

    func stopMoveStepBatchable(optionsMask: Matter.ColorControlTrait.OptionsBitmap, optionsOverride: Matter.ColorControlTrait.OptionsBitmap) throws -> BatchableCommand<Void>
  • Whether the device supports the moveColorTemperature command for this trait.

    Declaration

    Swift

    var supportsMoveColorTemperatureCommand: Bool { get }
  • Change a device’s color temperature based on a rate of movement.

    Declaration

    Swift

    func moveColorTemperature(moveMode: Matter.ColorControlTrait.MoveModeEnum, rate: UInt16, colorTemperatureMinimumMireds: UInt16, colorTemperatureMaximumMireds: UInt16, optionsMask: Matter.ColorControlTrait.OptionsBitmap, optionsOverride: Matter.ColorControlTrait.OptionsBitmap) async throws

    Parameters

    moveMode

    The direction in which to move the color temperature. This must be one of the values in HueMoveMode.

    rate

    The rate (in steps per seconds) used to change the device’s colorTemperatureMireds.

    colorTemperatureMinimumMireds

    The lower bound of the colorTemperatureMireds attribute for the command. This value must be between the colorTempPhysicalMinMireds and colorTemperatureMireds attributes. If this value is set to 0, colorTempPhysicalMinMireds is used as the lower bound.

    colorTemperatureMaximumMireds

    The upper bound of the colorTemperatureMireds attribute for the command. This value must be between the colorTemperatureMireds and colorTempPhysicalMaxMireds attributes. If this value is set to 0, colorTempPhysicalMaxMireds is used as the upper bound.

    optionsMask

    Determines which bits in the options 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 options attribute.

  • The batchable version of moveColorTemperature command above.

    See also

    moveColorTemperature

    Declaration

    Swift

    func moveColorTemperatureBatchable(moveMode: Matter.ColorControlTrait.MoveModeEnum, rate: UInt16, colorTemperatureMinimumMireds: UInt16, colorTemperatureMaximumMireds: UInt16, optionsMask: Matter.ColorControlTrait.OptionsBitmap, optionsOverride: Matter.ColorControlTrait.OptionsBitmap) throws -> BatchableCommand<Void>
  • Whether the device supports the stepColorTemperature command for this trait.

    Declaration

    Swift

    var supportsStepColorTemperatureCommand: Bool { get }
  • Change a device’s color temperature a specific amount over a period of time.

    Declaration

    Swift

    func stepColorTemperature(stepMode: Matter.ColorControlTrait.StepModeEnum, stepSize: UInt16, transitionTime: UInt16, colorTemperatureMinimumMireds: UInt16, colorTemperatureMaximumMireds: UInt16, optionsMask: Matter.ColorControlTrait.OptionsBitmap, optionsOverride: Matter.ColorControlTrait.OptionsBitmap) async throws

    Parameters

    stepMode

    The direction in which to move the color temperature. This must be one of the values in HueStepMode.

    stepSize

    The amount of units to move the device’s colorTemperatureMireds to.

    transitionTime

    The time (in 0.1 seconds) taken to move the device to the new color temperature.

    colorTemperatureMinimumMireds

    The lower bound of the colorTemperatureMireds attribute for the command. This value must be between the colorTempPhysicalMinMireds and colorTemperatureMireds attributes. If this value is set to 0, colorTempPhysicalMinMireds is used as the lower bound.

    colorTemperatureMaximumMireds

    The upper bound of the colorTemperatureMireds attribute for the command. This value must be between the colorTemperatureMireds and colorTempPhysicalMaxMireds attributes. If this value is set to 0, colorTempPhysicalMaxMireds is used as the upper bound.

    optionsMask

    Determines which bits in the options 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 options attribute.

  • The batchable version of stepColorTemperature command above.

    See also

    stepColorTemperature

    Declaration

    Swift

    func stepColorTemperatureBatchable(stepMode: Matter.ColorControlTrait.StepModeEnum, stepSize: UInt16, transitionTime: UInt16, colorTemperatureMinimumMireds: UInt16, colorTemperatureMaximumMireds: UInt16, optionsMask: Matter.ColorControlTrait.OptionsBitmap, optionsOverride: Matter.ColorControlTrait.OptionsBitmap) throws -> BatchableCommand<Void>
  • The action to take for a color loop.

    Declaration

    Swift

    enum ColorLoopActionEnum
  • The direction for an attribute on a circular scale.

    Declaration

    Swift

    enum ColorLoopDirectionEnum
  • The direction in which to change an attribute whose values are arranged in a circle.

    Declaration

    Swift

    enum DirectionEnum
  • How drift compensation is implemented.

    Declaration

    Swift

    enum DriftCompensationEnum
  • How enhanced color mode is specified.

    Declaration

    Swift

    enum EnhancedColorModeEnum
  • Move mode values.

    Declaration

    Swift

    enum MoveModeEnum
  • The mode by which stepwise changes to the attribute are applied.

    Declaration

    Swift

    enum StepModeEnum
  • The color capabilities that the device supports.

    Declaration

    Swift

    struct ColorCapabilitiesBitmap
  • ColorControl cluster FeatureMap.

    Declaration

    Swift

    struct Feature
  • Values for ColorLoopSet.

    Declaration

    Swift

    struct UpdateFlagsBitmap