I just got my new HTC 10 today and had the same issue. Though the device was brand new, apparently it was a dirty sensor. It looked clean to me, but I wiped it off with my T-shirt. That didn't work. I had to clean it with a damp cloth. Works great now.