struct EventStarterextension EventStarter : Copyable, CustomStringConvertible, Equatable, Escapable, Hashable, Identifiable, Node, NodeWithOutput, Sendable, StarterStruct for all Event based starters, relying on an event to trigger the automation.
-
The stable identity of the entity associated with this instance.
Declaration
Swift
let id: String -
Data that uniquely identifies a Node. Must be unique per Automation.
Declaration
Swift
let output: String -
The string-based identifier for the event. If the
eventisUnknownEventit will refer to the original Event ID provided.Declaration
Swift
let eventID: String -
The parameters for the event associated with the starter.
Declaration
Swift
let parameters: [Parameter] -
An expression that selects an entity or a list of entity associated with the
Starterat runtime.When entityExpression represents a single entity, entityExpression will be Constant(value: AnyAutomationEntity). Otherwise, entityExpression is an Expression, capable of resolving to any number of entities.
Declaration
Swift
let entityExpression: any Expression -
The unique entity for the HomeDevice or Structure entity associated with the Starter.
entity will be nil if the init(entityExpression: …) was used and the entityExpression is not a Constant to an AnyAutomationEntity.
Declaration
Swift
var entity: (any HomeObject)? { get } -
The identifier for the DeviceType associated with the Starter, if the entity is a device.
deviceType will be nil if entity is nil or not a device, such as a Structure or Room.
Declaration
Swift
var deviceType: (any DeviceType.Type)? { get } -
The string-based identifier for the DeviceType. If the
deviceTypeisUnknownDeviceTypeit will refer to the original DeviceType ID provided.deviceTypeID will be nil if entity is nil or not a device, such as a Structure or Room.
Declaration
Swift
var deviceTypeID: String? { get } -
Returns a Boolean value indicating whether two values are equal.
Equality is the inverse of inequality. For any values
aandb,a == bimplies thata != bisfalse.Declaration
Swift
static func == (lhs: EventStarter, rhs: EventStarter) -> BoolParameters
lhsA value to compare.
rhsAnother value to compare.
-
Returns true if the nodes are equal, false otherwise.
Declaration
Swift
func isEqual(to other: any Node) -> Bool -
A textual representation of this instance.
Calling this property directly is discouraged. Instead, convert an instance of any type to a string by using the
String(describing:)initializer. This initializer works with any type, and uses the customdescriptionproperty for types that conform toCustomStringConvertible:struct Point: CustomStringConvertible { let x: Int, y: Int var description: String { return "(\(x), \(y))" } } let p = Point(x: 21, y: 30) let s = String(describing: p) print(s) // Prints "(21, 30)"The conversion of
pto a string in the assignment tosuses thePointtype’sdescriptionproperty.Declaration
Swift
var description: String { get }