mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 07:49:52 +03:00
fixes for device_info
This commit is contained in:
@@ -705,18 +705,14 @@ bool AnalogSensor::get_value_info(JsonObject output, const char * cmd, const int
|
||||
output["api_data"] = data;
|
||||
return true;
|
||||
} else {
|
||||
char error[100];
|
||||
snprintf(error, sizeof(error), "cannot find attribute %s in entity %s", attribute_s, sensor_name);
|
||||
output.clear();
|
||||
output["message"] = error;
|
||||
return false;
|
||||
return EMSESP::return_not_found(output, "attribute", sensor_name); // not found
|
||||
}
|
||||
}
|
||||
return true; // found a match, exit
|
||||
}
|
||||
}
|
||||
|
||||
return false; // not found
|
||||
return EMSESP::return_not_found(output, "analog sensor", cmd); // not found
|
||||
}
|
||||
|
||||
void AnalogSensor::addSensorJson(JsonObject output, const Sensor & sensor) {
|
||||
|
||||
Reference in New Issue
Block a user