Attributes

struct Attributes

Attributes for the ColorControlTrait.

  • A list of the attribute IDs of the attributes supported by the cluster instance. Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var attributeList: [UInt32]? { get }
  • The current hue value of the light. The valid range of values is 0 to 254. Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var currentHue: UInt8? { get }
  • The current saturation value of the light. The valid range of values is 0 to 254. Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var currentSaturation: UInt8? { get }
  • The time remaining (in 0.1 seconds) until the current command is complete. Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var remainingTime: UInt16? { get }
  • The current value of the normalized chromaticity value x, as defined in the CIE xyY Color Space. Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var currentX: UInt16? { get }
  • The current value of the normalized chromaticity value y, as defined in the CIE xyY Color Space. Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var currentY: UInt16? { get }
  • The mechanism that is in use for compensation for color/intensity drift over time. Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var driftCompensation: Matter.ColorControlTrait.DriftCompensationEnum? { get }
  • A textual indication of what mechanism, if any, is in use to compensate for color or intensity drift over time. Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var compensationText: String? { get }
  • A scaled inverse of the current value of the color temperature, in mireds. Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var colorTemperatureMireds: UInt16? { get }
  • The attributes that are currently determining the color of the device. Must be one of the values in the ColorMode enum. Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var colorMode: Matter.ColorControlTrait.ColorModeEnum? { get }
  • A bitmap that determines the default behavior of some cluster commands. This should only be changed during commissioning. A ColorControl command does not continue beyond options processing if all of the following are true:

    • The OnOff cluster exists on the same endpoint as this cluster.
    • The onOff attribute of the OnOff cluster on this endpoint is false.
    • The value of the executeIfOff bit is 0.
    This bitmap has the following valid bits:
    • Bit 0 — ExecuteIfOff
    Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var options: Matter.ColorControlTrait.OptionsBitmap? { get }
  • The number of color primaries implemented on the device. If null, the number of primaries is unknown. Nullable: true.

    Declaration

    Swift

    @TraitAttribute
    var numberOfPrimaries: UInt8? { get }
  • The normalized chromaticity value x for this primary, as defined in the CIE xyY Color Space. Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var primary1X: UInt16? { get }
  • The normalized chromaticity value y for this primary, as defined in the CIE xyY Color Space. Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var primary1Y: UInt16? { get }
  • A representation of the maximum intensity of this primary as defined in the Dimming Light Curve in the BallastConfiguration cluster, normalized such that the primary with the highest maximum intensity contains the value 0xfe. If null, this primary is not available. Nullable: true.

    Declaration

    Swift

    @TraitAttribute
    var primary1Intensity: UInt8? { get }
  • The normalized chromaticity value x for this primary, as defined in the CIE xyY Color Space. Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var primary2X: UInt16? { get }
  • The normalized chromaticity value y for this primary, as defined in the CIE xyY Color Space. Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var primary2Y: UInt16? { get }
  • A representation of the maximum intensity of this primary as defined in the Dimming Light Curve in the BallastConfiguration cluster, normalized such that the primary with the highest maximum intensity contains the value 0xfe. If null, this primary is not available. Nullable: true.

    Declaration

    Swift

    @TraitAttribute
    var primary2Intensity: UInt8? { get }
  • The normalized chromaticity value x for this primary, as defined in the CIE xyY Color Space. Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var primary3X: UInt16? { get }
  • The normalized chromaticity value y for this primary, as defined in the CIE xyY Color Space. Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var primary3Y: UInt16? { get }
  • A representation of the maximum intensity of this primary as defined in the Dimming Light Curve in the BallastConfiguration cluster, normalized such that the primary with the highest maximum intensity contains the value 0xfe. If null, this primary is not available. Nullable: true.

    Declaration

    Swift

    @TraitAttribute
    var primary3Intensity: UInt8? { get }
  • The normalized chromaticity value x for this primary, as defined in the CIE xyY Color Space. Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var primary4X: UInt16? { get }
  • The normalized chromaticity value y for this primary, as defined in the CIE xyY Color Space. Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var primary4Y: UInt16? { get }
  • A representation of the maximum intensity of this primary as defined in the Dimming Light Curve in the BallastConfiguration cluster, normalized such that the primary with the highest maximum intensity contains the value 0xfe. If null, this primary is not available. Nullable: true.

    Declaration

    Swift

    @TraitAttribute
    var primary4Intensity: UInt8? { get }
  • The normalized chromaticity value x for this primary, as defined in the CIE xyY Color Space. Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var primary5X: UInt16? { get }
  • The normalized chromaticity value y for this primary, as defined in the CIE xyY Color Space. Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var primary5Y: UInt16? { get }
  • A representation of the maximum intensity of this primary as defined in the Dimming Light Curve in the BallastConfiguration cluster, normalized such that the primary with the highest maximum intensity contains the value 0xfe. If null, this primary is not available. Nullable: true.

    Declaration

    Swift

    @TraitAttribute
    var primary5Intensity: UInt8? { get }
  • The normalized chromaticity value x for this primary, as defined in the CIE xyY Color Space. Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var primary6X: UInt16? { get }
  • The normalized chromaticity value y for this primary, as defined in the CIE xyY Color Space. Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var primary6Y: UInt16? { get }
  • A representation of the maximum intensity of this primary as defined in the Dimming Light Curve in the BallastConfiguration cluster, normalized such that the primary with the highest maximum intensity contains the value 0xfe. If null, this primary is not available. Nullable: true.

    Declaration

    Swift

    @TraitAttribute
    var primary6Intensity: UInt8? { get }
  • The normalized chromaticity value x for this primary, as defined in the CIE xyY Color Space, of the current white point of the device. Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var whitePointX: UInt16? { get }
  • The normalized chromaticity value y for this primary, as defined in the CIE xyY Color Space, of the current white point of the device. Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var whitePointY: UInt16? { get }
  • The normalized chromaticity value x for this primary, as defined in the CIE xyY Color Space, of the current red color point of the device. Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var colorPointRX: UInt16? { get }
  • The normalized chromaticity value y for this primary, as defined in the CIE xyY Color Space, of the current red color point of the device. Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var colorPointRY: UInt16? { get }
  • A representation of the relative intensity of the red color point as defined in the Dimming Light Curve in the BallastConfiguration cluster, normalized such that the color point with the highest relative intensity contains the value 0xfe. If null, this value is invalid. Nullable: true.

    Declaration

    Swift

    @TraitAttribute
    var colorPointRIntensity: UInt8? { get }
  • The normalized chromaticity value x for this primary, as defined in the CIE xyY Color Space, of the current green color point of the device. Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var colorPointGX: UInt16? { get }
  • The normalized chromaticity value y for this primary, as defined in the CIE xyY Color Space, of the current green color point of the device. Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var colorPointGY: UInt16? { get }
  • A representation of the relative intensity of the green color point as defined in the Dimming Light Curve in the BallastConfiguration cluster, normalized such that the color point with the highest relative intensity contains the value 0xfe. If null, this value is invalid. Nullable: true.

    Declaration

    Swift

    @TraitAttribute
    var colorPointGIntensity: UInt8? { get }
  • The normalized chromaticity value x for this primary, as defined in the CIE xyY Color Space, of the current blue color point of the device. Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var colorPointBX: UInt16? { get }
  • The normalized chromaticity value y for this primary, as defined in the CIE xyY Color Space, of the current blue color point of the device. Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var colorPointBY: UInt16? { get }
  • A representation of the relative intensity of the blue color point as defined in the Dimming Light Curve in the BallastConfiguration cluster, normalized such that the color point with the highest relative intensity contains the value 0xfe. If null, this value is invalid. Nullable: true.

    Declaration

    Swift

    @TraitAttribute
    var colorPointBIntensity: UInt8? { get }
  • Represents non-equidistant steps along the CIE 1931 color triangle. Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var enhancedCurrentHue: UInt16? { get }
  • The attributes that are currently determining the color of the device. Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var enhancedColorMode: Matter.ColorControlTrait.EnhancedColorModeEnum? { get }
  • The current active status of the color loop. A value of 1 indicates an active color loop. A value of 0 indicates an inactive color loop. Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var colorLoopActive: UInt8? { get }
  • The current direction of the color loop. If the value is 1, the enhancedCurrentHue attribute is incremented. If the value is 0, the enhancedCurrentHue attribute is decremented. Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var colorLoopDirection: UInt8? { get }
  • The number of seconds it takes to perform a full color loop. Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var colorLoopTime: UInt16? { get }
  • The value of the enhancedCurrentHue attribute from which to start the color loop. Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var colorLoopStartEnhancedHue: UInt16? { get }
  • The value of the enhancedCurrentHue attribute before the color loop was started. enhancedCurrentHue is changed back to this value once the color loop is complete. Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var colorLoopStoredEnhancedHue: UInt16? { get }
  • The color capabilities that the device supports. This is a bitmap that corresponds to the values in [ColorControlTrait.ColorCapabilities]. Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var colorCapabilities: Matter.ColorControlTrait.ColorCapabilitiesBitmap? { get }
  • The minimum mired value supported by the device. This value must be less than or equal to colorTemperatureMireds. Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var colorTempPhysicalMinMireds: UInt16? { get }
  • The maximum mired value supported by the device. This value must be greater than or equal to colorTemperatureMireds. Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var colorTempPhysicalMaxMireds: UInt16? { get }
  • Specifies a lower bound on the value of the colorTemperatureMireds attribute for the purposes of coupling the colorTemperatureMireds attribute to the currentLevel attribute when the coupleColorTempToLevel bit of the options attribute of the LevelControl cluster is equal to 1. Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var coupleColorTempToLevelMinMireds: UInt16? { get }
  • The desired startup color temperature value when a device is supplied with power. The colorTemperatureMireds attribute is updated to this value. Setting this value to null sets colorTemperatureMireds to its previous value. Nullable: true.

    Declaration

    Swift

    @TraitAttribute
    var startUpColorTemperatureMireds: UInt16? { get }
  • A list of server-generated commands (server to client) which are supported by this cluster server instance. Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var generatedCommandList: [UInt32]? { get }
  • A list of client-generated commands which are supported by this cluster server instance.

    Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var acceptedCommandList: [UInt32]? { get }
  • Whether the server supports zero or more optional cluster features. A cluster feature is a set of cluster elements that are mandatory or optional for a defined feature of the cluster. If a cluster feature is supported by the cluster instance, then the corresponding bit is set to 1, otherwise the bit is set to 0 (zero). Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var featureMap: Matter.ColorControlTrait.Feature? { get }
  • The revision of the server cluster specification supported by the cluster instance. Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var clusterRevision: UInt16? { get }
  • The trait identifier.

    Declaration

    Swift

    static var identifier: String { get }
  • 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
  • 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.Attributes, rhs: Matter.ColorControlTrait.Attributes) -> 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)