mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
some case and nullptr checks
This commit is contained in:
@@ -580,7 +580,7 @@ bool AnalogSensor::get_value_info(JsonObject & output, const char * cmd, const i
|
||||
}
|
||||
|
||||
for (const auto & sensor : sensors_) {
|
||||
if (strcmp(command_s, sensor.name().c_str()) == 0 || Helpers::atoint(command_s) == sensor.gpio()) {
|
||||
if (Helpers::toLower(command_s) == Helpers::toLower(sensor.name().c_str()) || Helpers::atoint(command_s) == sensor.gpio()) {
|
||||
output["gpio"] = sensor.gpio();
|
||||
output["name"] = sensor.name();
|
||||
output["type"] = F_(number);
|
||||
|
||||
Reference in New Issue
Block a user