From 4b4cb0c97315a0244b716c381fc815f7abf737e8 Mon Sep 17 00:00:00 2001 From: Draygv2 <62559741+Draygv2@users.noreply.github.com> Date: Fri, 4 Oct 2024 08:39:56 +0200 Subject: [PATCH] Update main.ts ct range from 2200-6500 to 2000-6500 issue #586 --- src/main.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.ts b/src/main.ts index c5b17c81..be057f2a 100644 --- a/src/main.ts +++ b/src/main.ts @@ -633,7 +633,7 @@ class Hue extends utils.Adapter { 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); @@ -746,7 +746,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) {