diff options
Diffstat (limited to 'light_test.go')
-rw-r--r-- | light_test.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/light_test.go b/light_test.go index 5639630..2481c0f 100644 --- a/light_test.go +++ b/light_test.go @@ -2,6 +2,7 @@ package hue import ( "testing" + "fmt" ) func TestGetAllLights(t *testing.T) { @@ -13,3 +14,11 @@ func TestGetLight(t *testing.T) { bridge := NewBridge("192.168.1.128", "319b36233bd2328f3e40731b23479207") GetLight(bridge, "Bathroom Light") } + +func TestSetLightState(t *testing.T) { + bridge := NewBridge("192.168.1.128", "319b36233bd2328f3e40731b23479207") + randomLight := GetAllLights(bridge)[0] + fmt.Println(randomLight.Name) + newState := LightState{On: true} + SetLightState(bridge, randomLight.UniqueID, newState) +} |