Merge pull request #4397 from lost-hope/fix_internal_temp_usermod_main

This commit is contained in:
Soeren Willrodt 2024-12-14 20:22:56 +01:00 committed by GitHub
commit c8625c70dd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -50,7 +50,7 @@ public:
#else // ESP32 ESP32S3 and ESP32C3 #else // ESP32 ESP32S3 and ESP32C3
temperature = roundf(temperatureRead() * 10) / 10; temperature = roundf(temperatureRead() * 10) / 10;
#endif #endif
if(presetToActivate != 0){
// Check if temperature has exceeded the activation threshold // Check if temperature has exceeded the activation threshold
if (temperature >= activationThreshold) { if (temperature >= activationThreshold) {
// Update the state flag if not already set // Update the state flag if not already set
@ -58,7 +58,7 @@ public:
isAboveThreshold = true; isAboveThreshold = true;
} }
// Check if a 'high temperature' preset is configured and it's not already active // Check if a 'high temperature' preset is configured and it's not already active
if (presetToActivate != 0 && currentPreset != presetToActivate) { if (currentPreset != presetToActivate) {
// If a playlist is active, store it for reactivation later // If a playlist is active, store it for reactivation later
if (currentPlaylist > 0) { if (currentPlaylist > 0) {
previousPlaylist = currentPlaylist; previousPlaylist = currentPlaylist;
@ -101,6 +101,7 @@ public:
} }
} }
} }
}
#ifndef WLED_DISABLE_MQTT #ifndef WLED_DISABLE_MQTT
if (WLED_MQTT_CONNECTED) if (WLED_MQTT_CONNECTED)