aboutsummaryrefslogtreecommitdiff
path: root/light.go
diff options
context:
space:
mode:
authorCollin Guarino <collin.guarino@gmail.com>2016-02-12 17:54:23 -0500
committerCollin Guarino <collin.guarino@gmail.com>2016-02-12 17:54:23 -0500
commit0a8accca16c3231095be9d80e5496d039960ba62 (patch)
treefaa5a5a4ba2ba0b585cb81dea07aa52e14916b08 /light.go
parentf18585ea7bc206d931f850d7df1fb96125e2a232 (diff)
Speed improvements to SetLightState by using new GetLightByIndex func.
Diffstat (limited to 'light.go')
-rw-r--r--light.go2
1 files changed, 1 insertions, 1 deletions
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
}