From 63aee7ad0ff3251bdd77d1e138d6f72f5474d72b Mon Sep 17 00:00:00 2001 From: Draygv2 <62559741+Draygv2@users.noreply.github.com> Date: Fri, 4 Oct 2024 07:56:06 +0200 Subject: [PATCH] Update main.js ct range from 2200-6500 to 2000-6500 --- build/main.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build/main.js b/build/main.js index 1700688b..8f54f190 100644 --- a/build/main.js +++ b/build/main.js @@ -518,7 +518,7 @@ class Hue extends utils.Adapter { this.log.error(`Invalid "ct" value "${state.val}" (type: ${typeof ls.ct}) for id "${id}"`); return; } - finalLS.ct = Math.max(2200, Math.min(6500, ls.ct)); + finalLS.ct = Math.max(2000, Math.min(6500, ls.ct)); finalLS.ct = hueHelper.miredToKelvin(finalLS.ct); lightState = lightState.ct(finalLS.ct); if (!lampOn && (!('bri' in ls) || ls.bri === 0) && this.config.turnOnWithOthers) { @@ -621,7 +621,7 @@ class Hue extends utils.Adapter { lightState = lightState.hue(finalLS.hue); } if ('ct_inc' in ls && !('ct' in finalLS) && 'ct' in alls) { - alls.ct = 500 - 153 - ((alls.ct - 2200) / (6500 - 2200)) * (500 - 153) + 153; + alls.ct = 500 - 153 - ((alls.ct - 2000) / (6500 - 2000)) * (500 - 153) + 153; finalLS.ct = ((((alls.ct - 153 + ls.ct_inc) % 348) + 348) % 348) + 153; if (!lampOn && (!('bri' in ls) || ls.bri === 0) && this.config.turnOnWithOthers) { lightState = lightState.on(true); @@ -2299,4 +2299,4 @@ else { // otherwise start the instance directly new Hue(); } -//# sourceMappingURL=main.js.map \ No newline at end of file +//# sourceMappingURL=main.js.map