diff --git a/content/post/6-ac-automation-home-assistant-node-red.fr.md b/content/post/6-ac-automation-home-assistant-node-red.fr.md index 36c465a..a1ca51c 100644 --- a/content/post/6-ac-automation-home-assistant-node-red.fr.md +++ b/content/post/6-ac-automation-home-assistant-node-red.fr.md @@ -488,7 +488,7 @@ function isModeEligible(mode, temps, humidity, thresholds, currentMode) { // For heat mode (inverted logic) if (mode === "heat") { if (!isCurrent) { - const minStart = Math.min(...Object.values(threshold.start)); + const minStart = Math.max(...Object.values(threshold.start)); return tempForCheckStart < minStart; } else { return tempForCheckStop < threshold.stop; diff --git a/content/post/6-ac-automation-home-assistant-node-red.md b/content/post/6-ac-automation-home-assistant-node-red.md index 997f9ac..7b49f43 100644 --- a/content/post/6-ac-automation-home-assistant-node-red.md +++ b/content/post/6-ac-automation-home-assistant-node-red.md @@ -486,7 +486,7 @@ function isModeEligible(mode, temps, humidity, thresholds, currentMode) { // For heat mode (inverted logic) if (mode === "heat") { if (!isCurrent) { - const minStart = Math.min(...Object.values(threshold.start)); + const minStart = Math.max(...Object.values(threshold.start)); return tempForCheckStart < minStart; } else { return tempForCheckStop < threshold.stop;