Group
public struct Group
A group of lights. This is defined as one of the rooms in DALI, each one a grouping of lights that can be controlled
-
The name of the group
Declaration
Swift
public let name: String -
The formatted name of the group for printing
Declaration
Swift
public var formattedName: String { get } -
The name the currently set scene
Declaration
Swift
public let scene: String? -
The formated scene name for printing
Declaration
Swift
public var formattedScene: String? { get } -
The current color set for the group
Declaration
Swift
public let color: String? -
An average current color. Used for displaying state via color overlay
Declaration
Swift
public var avgColor: String? { get } -
Boolean of current power status
Declaration
Swift
public let isOn: Bool -
The scenes available for this group
Declaration
Swift
public var scenes: [String] { get } -
Set the scene of the group
Declaration
Swift
public func set(scene: String, callback: @escaping (_ success: Bool, _ error: DALIError.General?) -> Void)Parameters
sceneThe scene to set the lights to
callbackCalled when done
successWas successful
errorThe error, if any, encountered
-
Set the color of the group
Declaration
Swift
public func set(color: String, callback: @escaping (_ success: Bool, _ error: DALIError.General?) -> Void)Parameters
colorThe color to set the lights
callbackCalled when done
successWas successful
errorThe error, if any, encountered
-
Set the power
Declaration
Swift
public func set(on: Bool, callback: @escaping (_ success: Bool, _ error: DALIError.General?) -> Void)Parameters
onBoolean = the power is on
callbackCalled when done
successWas successful
errorThe error, if any, encountered
-
All the groups
Declaration
Swift
public internal(set) static var all: DALILights.Group -
The pod groups
Declaration
Swift
public internal(set) static var pods: DALILights.Group
View on GitHub
Group Structure Reference