APP to limit maximum brightness - eviltoast

It would be good if it had a function to limit brightness by time or by battery level and was Foss (but being Foss is not necessary if app is good and don’t want too much permissions). Current screens are too bright for me.