From 357717eb50e9eb13913171aa8ed08d618fc00a44 Mon Sep 17 00:00:00 2001 From: Kiwi Cam <32912464+kiwi-cam@users.noreply.github.com> Date: Mon, 15 Nov 2021 14:30:23 +1300 Subject: [PATCH] Fixed hexData not defined error in light.js --- accessories/light.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/accessories/light.js b/accessories/light.js index 8618214f..e48bfdf5 100644 --- a/accessories/light.js +++ b/accessories/light.js @@ -83,7 +83,7 @@ class LightAccessory extends SwitchAccessory { // Find hue closest to the one requested const foundValues = this.dataKeys('hue'); const closest = foundValues.reduce((prev, curr) => Math.abs(curr - state.hue) < Math.abs(prev - state.hue) ? curr : prev); - hexData = ""; + var hexData = ""; // If saturation is less than 10, choose white if (state.saturation < 10 && data[`white`]) { hexData = data[`white`];