From 2619e79f87f82767df00505f05586d707e35bbd5 Mon Sep 17 00:00:00 2001 From: Igor Date: Tue, 5 Dec 2023 04:09:20 -0300 Subject: [PATCH] Update __init__.py to fix out of range index values generated by X/Y/Z = 0 Entertainment Areas created by music sync apps (#968) Fixes automatically created entertainment areas containing LCX004/LCX006 Gradient Strips --- BridgeEmulator/HueObjects/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/BridgeEmulator/HueObjects/__init__.py b/BridgeEmulator/HueObjects/__init__.py index a7d51f3cb..95fb9a386 100644 --- a/BridgeEmulator/HueObjects/__init__.py +++ b/BridgeEmulator/HueObjects/__init__.py @@ -881,8 +881,9 @@ def getV2Api(self): if light().modelid in ["LCX001", "LCX002", "LCX003"]: loops = len(gradienStripPositions) elif light().modelid in ["915005987201", "LCX004", "LCX006"]: - loops = 3 + loops = len(self.locations[light()]) for x in range(loops): + print("x:", x) channel = { "channel_id": channel_id, "members": [