by Dave Rawle
Automatically adjusts screen brightness according to amount of ambient light. A vast improvement on the Xiaomi Auto brightness, which needs continual adjustment.
Thanks to the original author for the flow which I've modified to suit the Xiaomi phone. Although it is for a MI 9 lite it may also work on other models.