struct UnknownTrait
extension UnknownTrait : CustomStringConvertible, Equatable, Hashable, Sendable, Trait, TraitEncodable
Represents an unknown Trait
.
-
The trait identifier.
Declaration
Swift
static let identifier: String
-
List of all event types on the given Trait.
Currently, only
MatterTrait
traits 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.encodingFailed
if 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.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.