From fff01befda2223c8a91a5bb0df5e3c2cc095d529 Mon Sep 17 00:00:00 2001 From: Gisle Aune Date: Sun, 6 Jun 2021 15:22:56 +0200 Subject: [PATCH] fixed bug in hue driver where it would update either all or no bulbs. --- internal/drivers/hue/bridge.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/drivers/hue/bridge.go b/internal/drivers/hue/bridge.go index 88d7439..d275ea8 100644 --- a/internal/drivers/hue/bridge.go +++ b/internal/drivers/hue/bridge.go @@ -114,8 +114,9 @@ func (b *Bridge) SyncStale(ctx context.Context) error { for i, input := range inputs { index := indices[i] + inputCopy := input - eg.Go(func() error { return b.putLightState(ctx, index, input) }) + eg.Go(func() error { return b.putLightState(ctx, index, inputCopy) }) } return eg.Wait()