wolfeidau / lifx

Minimal lifx api for go
https://github.com/wolfeidau/lifx
MIT License
20 stars 4 forks source link

Allow nil states values from API #2

Closed wandergeek closed 10 years ago

wandergeek commented 10 years ago

I should be able to use this lib as follows (similar to hue driver)

    switch mode {
    case "hue":
<snip>
        l.Client.LightColour(l.Bulb, &hue, &saturation, nil, nil, &transition)
    case "temperature":
<snip>
        l.Client.LightColour(l.Bulb, nil, nil, nil, &utemp, &transition)
wandergeek commented 10 years ago

To send "nil" values just make anything undefined zero.