struct TimeTrait
Represents several Time related attributes for the current Structure.
-
Returns a Boolean value indicating whether two values are equal.
Equality is the inverse of inequality. For any values
a
andb
,a == b
implies thata != b
isfalse
.Parameters
lhs
A value to compare.
rhs
Another value to compare.
-
The event that will be subscribed to when an automation needs to be scheduled recurringly.
Declaration
Swift
struct RecurringClockTimeScheduledEvent
-
The event that will be subscribed to when an automation needs to be scheduled recurringly.
Declaration
Swift
struct RecurringSolarTimeScheduledEvent
-
The event that will be subscribed to when an automation needs to be scheduled.
Declaration
Swift
struct ScheduledEvent
-
Writes this object to the given
TraitEncoder
. ThrowsHomeError.encodingFailed
if the data could not be encoded.Declaration
Swift
func encode(with encoder: TraitEncoder) throws
-
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. Callhasher.combine(_:)
with each of these components.Important
In your implementation of
hash(into:)
, don’t callfinalize()
on thehasher
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)
-
The trait identifier.
Declaration
Swift
static let identifier: String
-
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.
-
Metadata about this
Trait
.Declaration
Swift
let metadata: TraitMetadata
-
List of the commands that are supported.
Declaration
Swift
static let supportedCommandTypes: [any Command.Type]
-
List of the event types that are supported by
TimeTrait
.Declaration
Swift
static let supportedEventTypes: [any Event.Type]