Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes "preset not found" issue when using internal temp UM #4397

Merged
merged 1 commit into from
Dec 14, 2024
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,15 @@ class InternalTemperatureUsermod : public Usermod
#else // ESP32 ESP32S3 and ESP32C3
temperature = roundf(temperatureRead() * 10) / 10;
#endif

if(presetToActivate != 0){
// Check if temperature has exceeded the activation threshold
if (temperature >= activationThreshold) {
// Update the state flag if not already set
if (!isAboveThreshold) {
isAboveThreshold = true;
}
// 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 (currentPlaylist > 0) {
previousPlaylist = currentPlaylist;
Expand Down Expand Up @@ -101,6 +101,7 @@ class InternalTemperatureUsermod : public Usermod
}
}
}
}

#ifndef WLED_DISABLE_MQTT
if (WLED_MQTT_CONNECTED)
Expand Down
Loading