If there is no sensor available then you might also just use the local time. Maybe not for a complete dark mode but for something like a night shift mode. The same way the OSs are doing it.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.