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
scene
The scene to set the lights to
callback
Called when done
success
Was successful
error
The 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
color
The color to set the lights
callback
Called when done
success
Was successful
error
The error, if any, encountered
-
Set the power
Declaration
Swift
public func set(on: Bool, callback: @escaping (_ success: Bool, _ error: DALIError.General?) -> Void)
Parameters
on
Boolean = the power is on
callback
Called when done
success
Was successful
error
The 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