Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v5.2.2
v5.2.3
17 changes: 9 additions & 8 deletions src/main/main.ino
Original file line number Diff line number Diff line change
Expand Up @@ -223,16 +223,17 @@ void handleTemperature(float temperatureF, float desiredTemp, const char* mode)

// Function to control humidifier based on humidity
void handleHumidity(float humidity, float desiredHumidity, const char* mode) {
if (humidity > desiredHumidity + HUMIDITY_HYSTERESIS) { // Humidity too high
Serial.printf("Humidity too high in %s mode! Turning off humidifier...\n", mode); //
setPlugState(humidifierPlug, false); // Turn off humidifier
if (humidity > desiredHumidity + HUMIDITY_HYSTERESIS) { // Humidity too high
Serial.printf("Humidity too high in %s mode! Turning off humidifier... Turning on exhaust fan...\n", mode); //
setPlugState(humidifierPlug, false); // Turn off humidifier
setPlugState(exhaustPlug, true); // Turn on exhaust fan

} else if (humidity < desiredHumidity - HUMIDITY_HYSTERESIS) { // Humidity too low
Serial.printf("Humidity too low in %s mode! Turning on humidifier...\n", mode); //
setPlugState(humidifierPlug, true); // Turn on humidifier
} else if (humidity < desiredHumidity - HUMIDITY_HYSTERESIS) { // Humidity too low
Serial.printf("Humidity too low in %s mode! Turning on humidifier...\n", mode); //
setPlugState(humidifierPlug, true); // Turn on humidifier

} else { // Humidity within range
setPlugState(humidifierPlug, false); // Turn off humidifier to save energy
} else { // Humidity within range
setPlugState(humidifierPlug, false); // Turn off humidifier to save energy
}
}

Expand Down