Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ScenesByLocation ¶
ScenesByLocation groups scenes by location ID.
Types ¶
type Color ¶
type Color struct {
Hue int // 0-360
Saturation int // 0-100
Brightness int // 0-100
Kelvin int // 2500-9000
}
Color represents a LIFX color in HSBK form.
type Group ¶
type Group struct {
ID string
Name string
LocationID string
LocationName string
Lights []*Light
AllOn bool
AnyOn bool
}
Group represents a LIFX group (room/zone).
func (*Group) AverageBrightness ¶
AverageBrightness returns the average brightness of lights that are on.
func (*Group) UpdateState ¶
func (g *Group) UpdateState()
UpdateState recalculates AllOn and AnyOn based on light states.
type Light ¶
type Light struct {
ID string
Name string
On bool
Brightness int
Color Color
GroupID string
LocationID string
Reachable bool
}
Light represents a LIFX light.
func (*Light) BrightnessPct ¶
BrightnessPct returns the brightness percentage (0-100).
func (*Light) SetBrightnessPct ¶
SetBrightnessPct updates brightness and keeps color in sync.
Click to show internal directories.
Click to hide internal directories.