From 446738f0d96499abc5a51abc21bff3414161a0ec Mon Sep 17 00:00:00 2001 From: proddy Date: Thu, 24 Sep 2026 22:20:26 +0200 Subject: [PATCH] remove condition, now handled in erase_command --- src/core/analogsensor.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/core/analogsensor.cpp b/src/core/analogsensor.cpp index 5f474fa30..b91f4772f 100644 --- a/src/core/analogsensor.cpp +++ b/src/core/analogsensor.cpp @@ -534,11 +534,7 @@ bool AnalogSensor::update(uint8_t gpio, const char * org_name, double offset, do bool found_sensor = false; EMSESP::webCustomizationService.update([&](WebCustomization & settings) { for (auto & AnalogCustomization : settings.analogCustomizations) { - if (AnalogCustomization.type == AnalogType::COUNTER - || (AnalogCustomization.type >= AnalogType::DIGITAL_OUT && AnalogCustomization.type <= AnalogType::PWM_2) - || AnalogCustomization.type == AnalogType::RGB || AnalogCustomization.type == AnalogType::PULSE) { - Command::erase_command(EMSdevice::DeviceType::ANALOGSENSOR, AnalogCustomization.name); - } + Command::erase_command(EMSdevice::DeviceType::ANALOGSENSOR, AnalogCustomization.name); if (AnalogCustomization.gpio == gpio) { found_sensor = true; // found the record // see if it's marked for deletion