remove condition, now handled in erase_command

This commit is contained in:
proddy
2026-09-24 22:20:26 +02:00
parent 8b1de52f55
commit 446738f0d9
+1 -5
View File
@@ -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