struct AttributeStarter
extension AttributeStarter : Copyable, CustomStringConvertible, Equatable, Escapable, Hashable, Identifiable, Node, NodeWithOutput, Sendable, Starter
Struct for all Attribute based starters relying on the value of a trait.
-
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 unique entity for the HomeDevice or Structure entity associated with the Starter.
Declaration
Swift
let entity: any HomeObject
-
The identifier for the DeviceType associated with the Starter, if the entity is a device.
Declaration
Swift
let deviceType: (any DeviceType.Type)?
-
The string-based identifier for the DeviceType. If the
deviceType
isUnknownDeviceType
it will refer to the original DeviceType ID provided.Declaration
Swift
let deviceTypeID: String?
-
The string-based identifier for the Trait. If the
trait
isUnknownTrait
it will refer to the original Trait ID provided.Declaration
Swift
let traitID: String
-
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
.Declaration
Swift
static func == (lhs: AttributeStarter, rhs: AttributeStarter) -> Bool
Parameters
lhs
A value to compare.
rhs
Another 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 customdescription
property 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
p
to a string in the assignment tos
uses thePoint
type’sdescription
property.Declaration
Swift
var description: String { get }