struct GoogleCoffeeMakerDeviceType
Generated struct for the Google Coffee Maker Device Type.
A kitchen applicance device that makes coffee. Interactions with coffee makers may include turning them on and off, adjusting cooking modes and food presets, adjusting the target temperature, and adjusting various non-cooking mode settings.
-
Additional information about this device type.
Declaration
Swift
let metadata: DeviceTypeMetadata
-
The traits that make up this device type.
Use this to access traits that are not directly exposed as properties on the
DeviceType
, like custom traits and traits belonging to utility types.Declaration
Swift
let traits: TraitCollection
-
Entrypoint to subscribe to events on this DeviceType.
Declaration
Swift
let events: any EventController
-
Creates a new
DeviceType
from the given trait collection.Throws
Throws aHomeError
if the given collection is missing one or more required traits for the given device type.Declaration
Swift
init(traits: TraitCollection, eventController: any EventController, metadataBuilder: ([any Trait]?) -> DeviceTypeMetadata) throws
-
A textual representation of this instance, suitable for debugging.
Calling this property directly is discouraged. Instead, convert an instance of any type to a string by using the
String(reflecting:)
initializer. This initializer works with any type, and uses the customdebugDescription
property for types that conform toCustomDebugStringConvertible
:struct Point: CustomDebugStringConvertible { let x: Int, y: Int var debugDescription: String { return "(\(x), \(y))" } } let p = Point(x: 21, y: 30) let s = String(reflecting: p) print(s) // Prints "(21, 30)"
The conversion of
p
to a string in the assignment tos
uses thePoint
type’sdebugDescription
property.Declaration
Swift
var debugDescription: String { get }
-
Trait Container for Google Traits.
Declaration
Swift
struct GoogleCoffeeMakerGoogleTraits
-
Trait Container for Matter Traits.
Declaration
Swift
struct GoogleCoffeeMakerMatterTraits