struct UnknownTraitextension UnknownTrait : CustomStringConvertible, Equatable, Hashable, Sendable, Trait, TraitEncodableRepresents an unknown Trait.
-
The trait identifier.
Declaration
Swift
static let identifier: String -
List of all event types on the given Trait.
Currently, only
MatterTraittraits support any events, but this will likely expand to other traits in the future.Declaration
Swift
static let supportedEventTypes: [any Event.Type] -
List of all commands supported by the Trait’s definition. The commands supported by a specific Trait instance may vary.
Declaration
Swift
static let supportedCommandTypes: [any Command.Type] -
Metadata about this
Trait.Declaration
Swift
let metadata: TraitMetadata -
Writes this object to the given
TraitEncoder. ThrowsHomeError.encodingFailedif the data could not be encoded.Declaration
Swift
func encode(with encoder: TraitEncoder) throws -
Creates a new Trait instance using data read from the given
TraitDecoder.Throws
HomeError.parseErrorwhen parsing fails.Declaration
Swift
init(decoder: TraitDecoder, interactionProxy: (any InteractionProxy)?, metadata: TraitMetadata) throwsParameters
decoderThe raw data representing this Trait.
interactionProxyProxy to the Interaction Client.
metadataMetadata about this Trait.