It has been modulated recently to take into account e-bike batteries. So independent battery powered lights no, wired from the main battery yes.German law states that lights must operate from a dynamo, with operation from a battery being optional.
It's a ridiculous law IMO.