We can clarify the sentence by adding a time phrase in front of it: Yesterday around this time, I had (just) finished my homework and (after that) I had nothing (left) to do. The past perfect signifies some action or situation that was completed (finishing your homework) before another one started (having nothing to do anymore). You may want to simply rephrase your sentence: After I had finished my homework.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.