@andoramb I don’t think there is but https://github.com/paviro/MMM-PIR-Sensor prob could be hacked with a few changes.

xrandr --output <outputname> --brightness 0.8 would be part of the script ?

Guess also if you have a webcam it should be possible to create a lux level also.