Nexus 5 weird charging behaviour I've had my Nexus 5 for about a year and a half now, but lately it's showing weird charging behaviour (check battery history graph):

 

I leave it charging every night and it's supposed to reach 100%, now it doesn't even go beyond 48%. What's going on and how can I fix it?
In the end I just decided to let the battery drop down to about 3%, restart the phone and then charge. Now it's fine again!