Hi Kisto!
Did your device suffer a fall, or liquid damage? If so, your sensor could possibly be damaged. Now, if not...please tell us what function is not working properly? For example, is the phone's screen not going off when putting it to your ear, during calls?
Let us know.