The fight against the Agra Cadabra in the dark before helped Ye Yan a lot.
Every time he was practicing blind fighting before, he never felt a sense of crisis because he knew that he would never get hurt for real. But now, this kind of fighting experience made him really exceed his limits.
Ye Yan's father taught him how to train his eyes to see the details that usually escape us when looking at things. He trained Ye Yan to expand his field of vision and to defocus his vision for him to pick up the slightest movement very quickly and see colors more vividly when picking up details of what he is seeing[1].
So, when the light is on, Ye Yan focuses on his surroundings, trying to memorize the details to assist him in battle when everything went dark.
However, most of the battle happened when it is dark. Luckily, he trained in this kind of battle a lot before, so even if he hadn't true blind fight experience, he can hold his ground.