aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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
}