|
|
@ -25,7 +25,7 @@ func main() { |
|
|
|
|
|
|
|
bus.JoinCallback(func(event lucifer3.Event) bool { |
|
|
|
switch event.(type) { |
|
|
|
case events.DevicesReady: |
|
|
|
case events.DeviceReady: |
|
|
|
bus.RunCommand(commands.AddAlias{Match: "nanoleaf:10.80.1.14:2d0c", Alias: "lucifer:name:Hex 5"}) |
|
|
|
bus.RunCommand(commands.AddAlias{Match: "nanoleaf:10.80.1.14:542f", Alias: "lucifer:name:Hex 6"}) |
|
|
|
bus.RunCommand(commands.AddAlias{Match: "nanoleaf:10.80.1.14:e760", Alias: "lucifer:name:Hex 7"}) |
|
|
@ -39,7 +39,7 @@ func main() { |
|
|
|
Match: "nanoleaf:10.80.1.14:*", |
|
|
|
Effect: effects.Pattern{ |
|
|
|
States: []device.State{ |
|
|
|
{Power: p(true), Intensity: p(0.3), Color: p(color.MustParse("xy:0.22,0.18"))}, |
|
|
|
{Power: p(true), Intensity: p(1.0), Color: p(color.MustParse("xy:0.22,0.18"))}, |
|
|
|
{Power: p(true), Intensity: p(0.4), Color: p(color.MustParse("xy:0.22,0.18"))}, |
|
|
|
{Power: p(true), Intensity: p(0.5), Color: p(color.MustParse("xy:0.22,0.18"))}, |
|
|
|
}, |
|
|
@ -47,16 +47,15 @@ func main() { |
|
|
|
}, |
|
|
|
}) |
|
|
|
|
|
|
|
time.Sleep(time.Second * 3) |
|
|
|
time.Sleep(time.Second * 1) |
|
|
|
bus.RunCommand(commands.AddAlias{Match: "nanoleaf:10.80.1.14:*", Alias: "lucifer:tag:Magic Lamps"}) |
|
|
|
bus.RunCommand(commands.Assign{ |
|
|
|
Match: "lucifer:tag:Magic Lamps", |
|
|
|
Effect: effects.Gradient{ |
|
|
|
Effect: effects.Pattern{ |
|
|
|
States: []device.State{ |
|
|
|
{Power: p(true), Intensity: p(0.5), Color: p(color.MustParse("xy:0.22,0.18"))}, |
|
|
|
{Power: p(true), Intensity: p(0.8), Color: p(color.MustParse("xy:0.22,0.18"))}, |
|
|
|
{Power: p(true), Intensity: p(1.0), Color: p(color.MustParse("hs:0,0.9"))}, |
|
|
|
{Power: p(true), Intensity: p(0.7), Color: p(color.MustParse("hs:100,0.8"))}, |
|
|
|
}, |
|
|
|
Interpolate: true, |
|
|
|
AnimationMS: 500, |
|
|
|
}, |
|
|
|
}) |
|
|
|