Skip to content

Instantly share code, notes, and snippets.

@bestform
Created December 27, 2015 23:01
Show Gist options
  • Save bestform/22082797bbd7a0ca6a3b to your computer and use it in GitHub Desktop.
Save bestform/22082797bbd7a0ca6a3b to your computer and use it in GitHub Desktop.
package main
import (
"log"
"github.com/bestform/gohue"
)
func main() {
client := gohue.NewClient("USERNAME", "IP")
err := client.Connect()
if err != nil {
log.Fatal(err)
}
for _, light := range client.Lights {
x, y := gohue.ConvertRGBToXY(0, 255, 0)
light.State.Xy[0] = x
light.State.Xy[1] = y
light.UpdateState(true)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment