Never enter the room at night in flowering stage. Even with a green light. That doesn’t work. To not break the darkness cycle, the green light would have to be exact same color as the leaves. Considering a plant has different colours, it has to absorb a bit. Its breaking her cycle.
Foliar at night, and right before night is the key for mildew.
The best time to foliar spray is when lights are on. Of course you turn them off for an hour letting just few CFL or T-5 on after application. You spray under the leaves. Spray on top if using a wetting agent like Optic Foliar Transport.