Skip to content

Commit a83f0a3

Browse files
authored
Update main.ts
ct range from 2200-6500 to 2000-6500 issue iobroker-community-adapters#586
1 parent 6fc7755 commit a83f0a3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,7 @@ class Hue extends utils.Adapter {
633633
return;
634634
}
635635

636-
finalLS.ct = Math.max(2200, Math.min(6500, ls.ct));
636+
finalLS.ct = Math.max(2000, Math.min(6500, ls.ct));
637637
finalLS.ct = hueHelper.miredToKelvin(finalLS.ct);
638638

639639
lightState = lightState.ct(finalLS.ct);
@@ -746,7 +746,7 @@ class Hue extends utils.Adapter {
746746
lightState = lightState.hue(finalLS.hue);
747747
}
748748
if ('ct_inc' in ls && !('ct' in finalLS) && 'ct' in alls) {
749-
alls.ct = 500 - 153 - ((alls.ct - 2200) / (6500 - 2200)) * (500 - 153) + 153;
749+
alls.ct = 500 - 153 - ((alls.ct - 2000) / (6500 - 2000)) * (500 - 153) + 153;
750750

751751
finalLS.ct = ((((alls.ct - 153 + ls.ct_inc) % 348) + 348) % 348) + 153;
752752
if (!lampOn && (!('bri' in ls) || ls.bri === 0) && this.config.turnOnWithOthers) {

0 commit comments

Comments
 (0)