From 0a8accca16c3231095be9d80e5496d039960ba62 Mon Sep 17 00:00:00 2001 From: Collin Guarino Date: Fri, 12 Feb 2016 17:54:23 -0500 Subject: Speed improvements to SetLightState by using new GetLightByIndex func. --- light.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'light.go') diff --git a/light.go b/light.go index 7847df1..e3fe2a5 100644 --- a/light.go +++ b/light.go @@ -137,7 +137,7 @@ func SetLightState(light *Light, newState LightState) error { } // Get the new light state and update the current Light struct - *light, err = GetLight(light.Bridge, light.Name) + *light, err = GetLightByIndex(light.Bridge, light.Index) if err != nil { return err } -- cgit v1.2.3